LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-06-2016, 02:24 PM   #16
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,907

Rep: Reputation: 1510Reputation: 1510Reputation: 1510Reputation: 1510Reputation: 1510Reputation: 1510Reputation: 1510Reputation: 1510Reputation: 1510Reputation: 1510Reputation: 1510

Actually.... 7 is correct.

If you do "ls -lai /proc/fs" you will find that there are two entries with inode 1...
[code]
$ ls -lai /proc/fs
total 0
4026531846 dr-xr-xr-x. 7 root root 0 Aug 25 17:50 .
1 dr-xr-xr-x. 488 root root 0 Aug 25 17:50 ..
4026532040 dr-xr-xr-x. 5 root root 0 Oct 6 15:05 ext4
4026532041 dr-xr-xr-x. 5 root root 0 Oct 6 15:05 jbd2
4026532184 dr-xr-xr-x. 2 root root 0 Oct 6 15:05 lockd
4026532236 dr-xr-xr-x. 2 root root 0 Oct 6 15:05 nfs
1 drwxr-xr-x. 2 root root 0 Aug 25 17:50 nfsd
4026532206 dr-xr-xr-x. 2 root root 0 Oct 6 15:05 xfs
[/quote]

.. in the usual way...
nfsd - which is a mount point.

Take a look at ls -lai /:
Code:
 ls -lai /
total 32
       96 dr-xr-xr-x.  18 root root   245 Sep  3 17:33 .
       96 dr-xr-xr-x.  18 root root   245 Sep  3 17:33 ..
      754 lrwxrwxrwx.   1 root root     7 Feb  3  2016 bin -> usr/bin
        2 dr-xr-xr-x.   6 root root  4096 Sep 28 07:14 boot
     1025 drwxr-xr-x.  20 root root  4600 Sep 11 06:20 dev
134329377 drwxr-xr-x. 186 root root 12288 Oct  5 11:11 etc
        2 drwxr-xr-x.  10 root root  4096 Apr  7 18:21 home
      106 lrwxrwxrwx.   1 root root     7 Feb  3  2016 lib -> usr/lib
      108 lrwxrwxrwx.   1 root root     9 Feb  3  2016 lib64 -> usr/lib64
134330127 drwxr-xr-x.   2 root root     6 Feb  3  2016 media
201327258 drwxr-xr-x.   3 root root    20 Jul  3 07:04 mnt
 67616889 drwxr-xr-x.   2 root root     6 Jul  4 14:05 mnt2
      113 drwxr-xr-x.   3 root root    20 Jun 29 18:25 opt
        1 dr-xr-xr-x. 485 root root     0 Aug 25 17:50 proc
201326689 dr-xr-x---.  11 root root  4096 Oct  6 15:13 root
    11767 drwxr-xr-x.  56 root root  1620 Sep 30 11:57 run
      759 lrwxrwxrwx.   1 root root     8 Feb  3  2016 sbin -> usr/sbin
 67109823 drwxr-xr-x.   2 root root     6 Feb  3  2016 srv
        1 dr-xr-xr-x.  13 root root     0 Aug 25 17:50 sys
    17882 drwxrwxrwt.  26 root root   660 Oct  6 15:02 tmp
      103 drwxr-xr-x.  13 root root   155 Jun 29 11:27 usr
      101 drwxr-xr-x.  23 root root  4096 Aug 25 17:50 var
Again, a mismatch (two mount points... home and sys)

Find does not have an exception for /proc. It works just fine.

The problem is WHEN find reads directories. Entries in /proc change while find is even reading them.

Within directories that are relatively static (/proc/fs doesn't change except when you load a new filesystem type) - no issues.

Even on a regular filesystem, if you delete a directory before find has processed it, but after find starts processing you will get an error.

Last edited by jpollard; 10-06-2016 at 02:27 PM.
 
Old 10-06-2016, 07:46 PM   #17
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,547

Rep: Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082Reputation: 2082
There is nothing strange about the duplicated inode numbers for directories that are mount points. Those inodes are on different filesystems. Inode numbers are not global. If you look at the "ls -lai" listings for /proc and /proc/fs/nfsd you will see that each has its own link to the inode for the /proc/fs directory. Those links are entirely separate and contribute to the link count for /proc/fs.

The situation is similar for the other pairs of mount point directories that have identical inode numbers.
 
Old 10-07-2016, 03:19 AM   #18
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 1,744

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
Instead of find perhaps you can use
Code:
locate whatever
?
This is much faster also.
You need to have the locate or mlocate package installed. It runs a sophisticated find at midnight and puts the result in a DB file.
 
Old 12-05-2016, 04:52 PM   #19
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 576

Rep: Reputation: 38
I'm a little late to the party here, but I just found this thread through Google.

I agree with BW-userx, that this is something specific to the way Slackware 14.2 is set up.

I've never seen this before on multiple Slackware, CentOS, and RHEL versions. But it's a solid hit on Slackware 14.2, not transient.

Cheers.
 
  


Reply

Tags
filesystem, find command, proc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
find: WARNING: Hard link count is wrong.... andrew.46 Slackware 2 11-13-2015 08:16 PM
Hard link count is wrong dwarf007 Linux - General 1 09-30-2008 01:34 PM
find: WARNING: Hard link count is wrong for /proc/1: Ramonvel Slackware 2 05-27-2008 10:28 PM
Error when using 'find' -- "WARNING: Hard link count is wrong..." xGreenmanx Linux - Software 6 03-11-2006 06:35 PM
WARNING: Hard link count is wrong for /proc Fr33B5D Linux - General 1 08-30-2005 06:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration