[CLUE-Tech] Finding all hard links to a file
Keith Hellman
khellman at mcprogramming.com
Sat May 15 16:58:56 MDT 2004
On Sat, May 15, 2004 at 04:31:37PM -0600, Chris Greene wrote:
> You should be able to use find for this.
>
> Example: find /home -inum 32092 -print
>
> I had a file named 'word' in my home directory. I created a hard link
> with "ln word yo". When I ran "ls -li" I received:
>
> 32092 -rw-rw-r-- 2 chris chris 2318 May 14 11:16 word
> 32092 -rw-rw-r-- 2 chris chris 2318 May 14 11:16 yo
>
> You can see they both have the same inode #. Running "find /home -inum
> 32092 -print" resulted in:
> /home/chris/word
> /home/chris/yo
>
Review Angelo's original request, he doesn't want to start with inum, he
wants a function or script that accepts a *filename* and returns a *list
of files*.
--
Keith Hellman #include <disclaimer.h>
khellman at mcprogramming.com from disclaimer import standard
public key @ www.mcprogramming.com
"You want to know the secret to immortality, write a bunch of songs that people
keep singin' and playin'."
-- Dr(x) John on Duke Ellington
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://cluedenver.org/pipermail/clue-tech/attachments/20040515/6cd3ccb9/attachment.bin
More information about the clue-tech
mailing list