Tuesday, July 27, 2004

Finding the hard links to a file using find

% ls -li /usr/bin/at
lists that there are 4 links to the file.

% df /usr/bin/at
will give the filesystem on which this file resides.

% find /usr -xdev -inum 8041 -print
Start the find on the top of that filesystem, use -xdev to restrict search to that filesystem only, and use the inode number to find the various files that use the same inode.

0 Comments:

Post a Comment

<< Home