[CentOS] Locating the broken links

Thu Jan 31 15:24:45 UTC 2008
Ross S. W. Walker <rwalker at medallion.com>

Ioannis Vranos wrote:
> 
> Garrick Staples wrote:
> >
> >> I am trying "cleanlinks" and is cleaning lot of stuff, 
> erasing links and 
> >> empty directories, I hope it will not mess my 
> installation, especially 
> >> by doing the last.
> > 
> > On your entire OS?  Sounds like a pretty good way to break things.
> 
> 
> Yes it damaged it. I had to reinstall from scratch... Any 
> pretty way to 
> find broken links on the entire filesystem would be welcome however.

How about:

find . -L -type l -ls

then after you have evaluated them and they are all good to purge,

find . -L -type l -exec rm -f \{\} \;

-Ross

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.