Broken links

Timothy Bauscher timothy at linuxfromscratch.org
Sat Aug 17 19:40:16 PDT 2002


On Sat, Aug 17, 2002 at 10:13:15PM -0400, James Drabb wrote:
> Are there any tools out there to scan a directory for broken links?
> I know I have some broken links under /usr and want to clean them up.

Ok, as usual, the long as script ...

ls -l /usr/* | grep '^l' | awk '{ print $11 }' \
| while read file; do
if [ ! -e /usr/${file} ]; then echo $file is b0rken; fi
done

(just watch. someone else will make a one liner. such is
my life...)

-- 
timothy(at)linuxfromscratch.org

-*- "Share and Enjoy" || "Go stick your head in a pig" -*-
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message



More information about the blfs-support mailing list