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

Re: [Fedora] FC4 'find' command is finding wrong hard link count

Tom Broadhurst wrote:

I understand this is not a critical problem - yet, and I understand the
principal behind /proc but, this hasn't happened to me in more than 10 years
using Redhat/Fedora.
So something has either changed or something's broken.
I routinely use "find / -name ......", so how do I eliminate /proc from the
search path?
The suggested -noleaf option pertains to the 2 hard links "." and ".." in
every directory, including /proc. A 'ls -al' of /proc shows them clearly.
A simple "If it don't work right, don't use it" (my words, not yours), is
not an acceptable answer, unless it comes from the filesystem or find
command developers.

The problem with the link count in /proc is that it changes every time a process is created or terminates, so the number of directories that 'find' sees during processing might not agree with the link count that it read at the start. I admit that doesn't seem terribly likely unless the system is quite busy, but it can certainly happen.

I almost always use the "-xdev" option to prevent 'find' from descending
into file systems other than the ones I explcitly specified, e.g.,

    find -xdev / /usr /var ...

It's pretty rare that I actually want to search my entire system, which
would include a news spool, a seldom used MS-Windows file system,
possibly a mounted CD or DVD, ..., and of course /proc.

Bob Nichols         Yes, "NOSPAM" is really part of my email address.

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