Re: [Q] Hard links and soft links?

From: Leon. (leon_at_noteon.net)
Date: 11/29/03


Date: Sun, 30 Nov 2003 08:45:10 +1100


"Hactar" <ebenONE@tampabay.ARE-ARE.com.unmunge> wrote in message
news:bqaol1$dn$1@pc.tampabay.rr.com...
> In article <j80yb.38995$jb.381848@news.bora.net>,
> Tester A. <benew666@hotmail.com> wrote:
> > Hi,
> >
> > I would like to know which files are linked to a certain file?
> >

> For soft links, I don't know of a reliable way, and the links can be on
any
> filesystem. For absolute path, you can try:
>
> find / -type l | xargs ls -ld | grep -F "-> ORIG"
>

Perhaps a quicker way is to use the "locate" database (rebuilt with
updatedb), if you are happy that the links in the excluded areas arent a
problem. This will only work when we know what the NAME of the files we are
trying to find are.

locate NAME| xargs ls -ald

The sym links are then obvious, and the hard links can be determined by the
name and the link count on the ls output... the link count counts the number
of hard links to the file. This only



Relevant Pages

  • Re: [Q] Hard links and soft links?
    ... > filesystem. ... For absolute path, you can try: ... The sym links are then obvious, and the hard links can be determined by the ...
    (comp.os.linux.misc)
  • Re: Hard links to directories
    ... , Zemran wrote: ... Hard links to directories are the easiest way to completely ... corrupt a filesystem. ...
    (alt.os.linux.suse)
  • Re: Unmounting by filesystem ID
    ... in list of mounts they ... >>filesystem if I known absolute path but do not enter to chroot. ...
    (freebsd-arch)
  • Re: Partitonen auf _einer_ Festplatte sinnvoll?
    ... Wenn ich bei LVM eine ext2-Partition über mehrere Partitionen und/oder ... Hard links sind ein Feature des Filesystems und dem Filesystem sind ... Von SAN-Boxen mit> 100 Platten ...
    (de.comp.os.unix.linux.misc)
  • Re: Good filsystems (eg ZFS) and single instance storage.
    ... Is their a filesystem that can automatically spot files ... create a single instance of each file with hard links. ... be terrible when uploading new files), ... areas, detect .jpgs identical to ones in the main file area, and ...
    (comp.unix.solaris)