On Sun, 2003-11-30 at 13:23, Andrew Gaffney wrote:
> I recently installed tripwire on one of my Gentoo servers. Everytime I run it, I get 
> ~250 
> warnings about files not existing, which are symlinks pointing to nothing. How can I 
> find 
> all invalid symlinks and delete them? Thanks.

( for f in $(find / ! -fstype proc -type l 2>/dev/null); do cd $(dirname
"$f") 2>/dev/null && ! test -e "$(readlink "$f")" && echo "$f"; done )

 This would print your broken symbolic links, just take any action you
want about it later.



--
[EMAIL PROTECTED] mailing list

Reply via email to