[CentOS] Locating the broken links
Christian Volker
cvolker at vmware.com
Thu Jan 31 15:54:31 UTC 2008
Hi,
> Any pretty way to find broken links on the entire filesystem would be
> welcome however.
I have a script available for this:
#!/bin/bash
# command line parameter would be the directory to search
for i in ` find $1 -type l `; do
# feststellen, ob der link noch gueltig ist oder nicht
file $i | grep -q broken
if [ $? -eq 0 ] ; then
echo "Broken link $i"
fi
done
exit
Christian Volker
Technical Support Engineer
--
Parnell House, Barrack Square, Ballincollig, Co. Cork, Ireland
More information about the CentOS
mailing list