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

Re: weird find error on fresh etch system

On Sat, 2009-01-03 at 21:54 +0000, James Youngman wrote:
> On Wed, Aug 13, 2008 at 2:11 PM, Mumia W..
> <paduille.4061.mumia.w+nospam@earthlink.net> wrote:
> > On 08/13/2008 12:16 AM, Zach Uram wrote:
> >>
> >> I just installed Debian 4.0 and whenever I use find on /  I see:
> >>
> >> find: WARNING: Hard link count is wrong for ./proc/sys/net: this may


> > Never use the find command to search /proc; that is a special virtual
> > filesystem used to configure your system. If programs touch the wrong things
> > in /proc, it could create serious problems for your computer.
> Hmm.   Have you ever seen such a problem first-hand, or are you just
> propagating a rumour you heard somewhere?   I ask since find doesn't
> actually touch the filesystem, it just traverses it.   Of course if
> you specify an action like -delete, then yes, find will touch the
> filesystem.

In actual point of fact, for a "real" filesystem, a file or directory
has an "access time" (atime) that changes by the simple act of
traversing a directory or reading a file.  So the file system _does_
change as a result of running 'find'.

You can use 'stat --printf='C=%z\nA=%x\nM=%y\n' file' to see the values
and how they change, where 'file' is a file or directory name.

/proc reports atime/mtime/ctime values when you run 'stat' on one of the
objects found in it, but the values don't change as a result of anything
a user does.

I doubt that a regular user could do anything to the contents of /proc,
and it may be that even the root user couldn't, though I'd not be eager
to try it.  So having 'find' or anything else 'touch' the contents
of /proc is certainly safe for all regular users.


> James.
Bob McGowan

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply to: