Re: Finding hard links

2006-10-17 Thread T
On Tue, 17 Oct 2006 15:46:46 -0700, Bob McGowan wrote: >> Is it possible to find the hard links of the same file? Ie, group the >> above finding into same file groups? > > find . -type f -links +1 -ls | sort -n -k 1 > > This command line will [...] Bingo! thanks a lot. -- Tong (remove undersc

Re: Finding hard links

2006-10-17 Thread Bill Marcum
On Tue, Oct 17, 2006 at 04:45:05PM -0400, T wrote: > Hi > > How can I find hard linked files? > > Is it possible to find the hard links of the same file? Ie, group the > above finding into same file groups? > Use stat or 'ls -i' to find the file's inode number, and 'find -inum' to find other fi

Re: Finding hard links

2006-10-17 Thread Bob McGowan
T wrote: Hi How can I find hard linked files? Is it possible to find the hard links of the same file? Ie, group the above finding into same file groups? thanks find . -type f -links +1 -ls | sort -n -k 1 This command line will find all regular files (-type f) that have 2 or more hard link

Re: Finding hard links

2006-10-17 Thread Jon Dowland
On Tue, Oct 17, 2006 at 04:45:05PM -0400, T wrote: > Hi > > How can I find hard linked files? All "regular" files are hard links. See the stat(1) command tells you how many files point at a given inode (so, if "Links:" > 1, you have two filenames and one

Re: Finding hard links

2006-10-17 Thread Daniele P .
On Tuesday 17 October 2006 22:45, T wrote: > Hi > > How can I find hard linked files? Hi, using for example: [ "`stat -c %h filename`" -gt 1 ] && echo hard linked > Is it possible to find the hard links of the same file? Ie, group the > above finding into same file groups? AFAIK it's not possib

Re: Finding hard links

2006-10-17 Thread Roberto C. Sanchez
On Tue, Oct 17, 2006 at 04:45:05PM -0400, T wrote: > Hi > > How can I find hard linked files? > Anything that is a file is a hard link. Regards, -Roberto -- Roberto C. Sanchez http://people.connexer.com/~roberto http://www.connexer.com signature.asc Description: Digital signature