I had a little script that would remove broken links. I used to do it like this:

if ! stat -L $link > /dev/null; then rm $link; fi

But recently (some time in February according to the CVS records) stat was changed so that stat -L would use lstat(2) if the link is broken.

So I had to change it to

if stat -L $link | awk '{print $3}' | grep l > /dev/null;
then rm $link; fi

but it is a lot less elegant.

What is the proper accepted way to remove broken links?

Stephen
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to