[lug] Re: Finding Broken Links

Eric Kilfoil ekilfoil at viawest.net
Sun May 27 02:14:06 MDT 2001


There may be an easier way, but this works:

#!/usr/bin/bash

for f in `find / -type l` ; do
	if [ ! -e $f ] ; then
		echo $f;
	fi;
done

Regards,

Eric Kilfoil
Sr. UNIX Systems Engineer
ViaWest Internet Services

On Sun, 27 May 2001, SoloCDM wrote:

> On Sun, 27 May 2001, D. Stimits wrote:
>
> % Date: Sun, 27 May 2001 01:45:19 -0600
> % From: D. Stimits <stimits at idcomm.com>
> % Reply-To: lug at lug.boulder.co.us
> % To: lug at lug.boulder.co.us
> %
> % SoloCDM wrote:
> % >
> % > How is it possible to find links that are broken?
> %
> % Give an example...http web links? Symbolic links to non-existent hard
> % link files?
>
> Good point...
>
> Symbolic or hard links to missing or removed files on hard drives.
>
> Note: When you reply to this message, please include the mailing
>       list/newsgroup address and my email address in To:.
>
> *********************************************************************
> Signed,
> SoloCDM
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>




More information about the LUG mailing list