Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: finding symlinks without target



Sven Guckes wrote:
> 
> Hi!
> 
> Problem:
> Find (and print) all symbolic links without a target within the current dirtree.
> 
> Anyone hints?

Not too elegant, but it works:

   for d in *(@); do cat $d >/dev/null 2>&1 || print $d; done

Bernd

--
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@xxxxxxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html



Messages sorted by: Reverse Date, Date, Thread, Author