[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Finding hard links

T wrote:

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?


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 links (-links +1) and list them (-ls, format similar to ls -l, except that it includes the inode number in column one). The result is piped to a numeric sort on column one.


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply to: