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

Re: A direct way to find hard links?

Andrey Andreev wrote:
> Adam Funk wrote:
>>When I see in a listing that a file has one or more other hard links, for
>>is there any direct way to find the other /path/to/files that point to the
>>same inodes?
> Something like in bash:
> for (( i=2 ; $i < 10 ; i = $i +1 )) ; do find . -links $i -and -type f
> ; done
> I assume my bash is dreadful, so if you have a prettier solution just
> tell me.

I knew it looked too ugly :)

 find . -links +1 -type f -ls

There you go.


Andrey Andreev
University of Helsinki
Dept. of Computer Science

Reply to: