Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: finding symlinks without target
- X-seq: zsh-users 1256
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Sven Guckes <guckes@xxxxxxxxxxxxxxxxx>, ZShell Users <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: finding symlinks without target
- Date: Fri, 23 Jan 1998 08:00:23 -0800
- In-reply-to: <19980123154701.05885@xxxxxxxxxxxxxxxxx>
- References: <19980123154701.05885@xxxxxxxxxxxxxxxxx>
On Jan 23, 3:47pm, Sven Guckes wrote:
} Subject: finding symlinks without target
}
} Find (and print) all symbolic links without a target within the current
} dirtree.
file **/*(D@) | fgrep broken
(You may need to change the grep if you're not using GNU `file`.)
Oh, you want it all in zsh?
for i in **/*(D@); [[ -f $i || -d $i ]] || echo $i
But I think the pipe to fgrep would be faster. (Why isn't there a glob
qualifier to chase links? **/*(@^.,@^/) would appear to be perfect, but
doesn't work.)
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author