RE: Locating the broken links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux