[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "find" doesn't work
From: |
Marcus Brinkmann |
Subject: |
Re: "find" doesn't work |
Date: |
Fri, 14 Jun 2002 20:11:10 +0200 |
User-agent: |
Mutt/1.3.28i |
On Fri, Jun 14, 2002 at 06:30:35PM +0200, Ludovic Courtès wrote:
> I found the reason why find doesn't work. Beside setting st_nlink to the
> number of subdirs plus two as Thomas said, it is also necessary to set a
> different inode number (st_ino) for each node of the fs. Otherwise find will
> just skip the subdirs that have an already seen inode number. The version of
> shadowfs I have just doesn't set the st_ino field, so it may or may not work.
The inode number is not a reliable unique identifier for a file in the
system. It should use the st_ino + st_dev field. Only both together
uniquely identify a file.
> This means that find may also not work well when searching across various
> filesystems since different filesystems may very well use the same inode
> numbers.
Maybe it tries to figure out "mount points" itself? It will fail to do so
on the Hurd.
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann GNU http://www.gnu.org marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de
Re: "find" doesn't work, Marcus Brinkmann, 2002/06/10