Re: Find hard links?

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

 



On Wed, 2 Feb 2005, Paul Howarth wrote:

> D. D. Brierton wrote:
> > I know that you can use find like so:
> >
> > find -type l
> >
> > to find symbolic links, but does anyone know how one finds hard links?
>
> Try:
>
> $ find /some/directory -links +1 -type f -ls
>
> The files with the same numbers in the left hand column are hard
> linked to each other.

as another tidbit of info, you can see the i-number of a file with:

  $ ls -i <filename>

then use find to find *all* hardlinks to the same file with:

  $ find <dir> -inum <inumber>

just make sure you do it within the same filesystem.  but again, this
isn't exactly what the OP was asking.  the original question is still,
in a sense, kind of meaningless.

rday


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux