[lug] Tools to navigate Unix links backwards?

Chip Atkinson chip at pupman.com
Fri Jul 23 09:49:51 MDT 2010


I don't know about a tool for this but perhaps you could run 
ls -ilr / | sort -n | uniq -w 7 -d 
to get the list of hardlinks that are pointing to the same file



On Fri, 23 Jul 2010, Vince Dean wrote:

>  I've inherited a system that depends on a complicated directory
> structure with multiple links, both hard and symbolic, to some of the
> files and directories. The fact that there may be many paths to the same
> file (aliases) makes the system hard to understand and maintain. It
> would help if I could easily find all the links to a given file, that
> is, follow the links backwards.
> 
> I can imagine a tool which would scan a file system and build an index
> of all the links it finds, so that I could follow the links in both
> directions. It would work something like updatedb and locate.
> 
> Does such a tool exist? I can't be the first person to want such a thing.
> 
> Thanks,
> Vince
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
> 




More information about the LUG mailing list