[ale] how to find

Danny Cox danscox at mindspring.com
Thu Jun 13 11:18:52 EDT 2002


Andy,

On Thu, 2002-06-13 at 08:14, Zyman, Andy wrote:
> How i can find all links on the particular file?
> Exmpl: /etc/init.d/xxx has 5 links - info from "ls" command. But how i can
> find all these links?
> // I assume that i don't want to go through all ..../rcXX levels. 

	Well, since ls is showing you the link count, these are hard links, and
you're in luck.  Find the inode number via 'ls -i file'.  Then, from the
directory above (or perhaps even two above), type:

	find . -inum <number> -print

Since it's in /etc, you probably don't want to start at '/', or it'll
take a loooong time.  If you do need to, or if the above didn't find all
of them, then see the -xdev option to find, which will restrict it to
one filesystem.

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list