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

Re: Hard links



On Wed, May 24, 2000 at 11:16:42PM +0200, Sven Burgener wrote:
> >"ls -il" gives you the inode-numbers, so you'll see, which files are
> >hard-linked.
> >if you need to search the whole disk, then you want to use
> "find -inum".
> 
> Yes, that works. But only for some files I created for this test just
> now. Assume I try to do it for /usr:
> 
>  108545 drwxr-xr-x  21 root     root         1024 Feb 19 17:34 usr
> 
> and now I issue:
> 
> hp90:/root # find / -inum 108545
> /usr
> 
> All I got is /usr! How can that be explained? I must be missing
> something...

That is correct.  You can't make hardlinks to directories (it would be
very naughty and corrupt your file system).  Of course, all rules have
exceptions, and that is the case of '..', which is in /usr/bin,
/usr/lib, etc, and each of those points to the parent (/usr).

-- 
Brian Moore                       | Of course vi is God's editor.
      Sysadmin, C/Perl Hacker     | If He used Emacs, He'd still be waiting
      Usenet Vandal               |  for it to load on the seventh day.
      Netscum, Bane of Elves.



Reply to: