LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-10-2006, 03:02 AM   #1
xGreenmanx
LQ Newbie
 
Registered: Feb 2006
Location: The Country Music Capital
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
Exclamation Error when using 'find' -- "WARNING: Hard link count is wrong..."


Alright, possible noob alert here. First a little background on my linux/computer usage so that you guys can hopefully help me without being overly elaborate or leaving me with a blank stare. I've been a computer geek since the age of twelve, during the Windows 3.11 days. Geek to the point that I, purely for my own enjoyment, read the entire DOS/Windows manual and did all the examples for the DOS commands (sad I know). I've been using linux (slackware 9 and then 10.2) off and on for a couple years. Mostly just tinkering and whatnot. I've no problem getting around directories, creating/making/editing/deleting directories and text files (provided I know what Im supposed to type and where to put it), moving/copying files and setting up a basic ftp server. I dont usually have any problems with commands accept when it comes to knowing which command I should actually use. syntax and usage after that is gravy thanks to google and the O'REILLY Linux Pocket Guide sitting infront of me.

OK, with that out of the way on to my problem. I found one other thread on here with this error message but It had one reply which pretty much said these aren't the files you're looking for. I installed Suse OSS 10.0 three days ago (ftp installation). And today I *think* I installed a package that allows me to connect to my digital cam so I tried to use slocate to find it and this is what I got, cut and pasted from the terminal.

linux:/home/clayton # slocate -d
bash: slocate: command not found
linux:/home/clayton #


Same thing happens when I try to use locate. So I used find to ... well find.. slocate or locate and got the following message:

clayton@linux:~> su
Password:
linux:/home/clayton # find / -type f -name slocate
find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
find: /proc/7526/task: No such file or directory
find: /proc/7526/fd: No such file or directory
find: /media/floppy: No medium found
linux:/home/clayton #


Now my linux knowledge ends abruptly where messages like this come in. I havent the slightest where to even begin so I guess just throw some syntax at me or link me to a related post. I've got another question or two about finding and installing slocate using YaST2 (I search for it and it finds nothing) but I'll make a separate post for that seeing as how this one is insanely long winded and complicated enough as is.

Any and all help is much appreciated

-Clayton

PS: LQ.org roxors!! WOOT!
 
Old 03-10-2006, 08:09 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The problem with find seems to be a bug in some versions of the kernel. Have a look at https://bugzilla.redhat.com/bugzilla....cgi?id=162418 and see if it describes the same problem.

I've seen the problem, but don't know much about it. It's not happening on my current setups (kernel 2.6.15.6)...
 
Old 03-10-2006, 08:54 PM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
You could always try an fsck on the system partition.

shutdown -Fr now

The -F will force an fsck when the system starts.
 
Old 03-10-2006, 09:11 PM   #4
xGreenmanx
LQ Newbie
 
Registered: Feb 2006
Location: The Country Music Capital
Distribution: Gentoo
Posts: 10

Original Poster
Rep: Reputation: 0
My kernel version

Linux linux 2.6.13-15.8-default #1 Tue Feb 7 11:07:24 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux

Apparently the bug was "fixed" in version 2.6.14-1.1637_FC4smp (granted that is fedora and not suse) but, according to another user, was not fixed/showed back up in version 2.6.14-1.1653_FC4smp. Another weird quark, when I use the -noleaf option as a regular user I will list about 30 or 40 directories with Permission Denied printed out to the right (must be root to access these I assume) but when I run it as root using I get the following:


linux:/ # find / -noleaf -type f -name slocate
find: /proc/6390/task: No such file or directory
find: /proc/6390/fd: No such file or directory
find: /media/floppy: No medium found
linux:/ #


At this point Im going to try a kernel update. I just included the above for anyone else that runs across the same problem. Thanks a bunch for the link gilead.

-Clayton
 
Old 03-10-2006, 09:29 PM   #5
xGreenmanx
LQ Newbie
 
Registered: Feb 2006
Location: The Country Music Capital
Distribution: Gentoo
Posts: 10

Original Poster
Rep: Reputation: 0
Smile

Ok, tried the shutdown -Fr now(handy btw thank you) command and it got rid of everything but the find: /media/floppy: No medium found which I am assuming is completely normal. And upon searching for a few known present files it works like a charm now... I just have to use the -noleaf option. Kudos to you guys for the help. I may still try a kernel update because it annoys me when I have to circumvent things I shouldn't have to.
 
Old 03-11-2006, 05:28 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
When I'm searching the root directory with the find command I use the -mount parameter. This keeps the find command from looking on other mounted file systems. In this case the /proc directory is a mounted file system.

I like to have a normal user account run the find command searching the root directory. Those privilege complaints may be intended. Normal users usually aren't allowed to look into every directory. But it is a good way to see what a normal user can and cannot see. You can pretty much decide for yourself if you want to grant access to normal users to any of these restricted view directories. If you want to get rid of the permission complaints without changing file permissions you can use the 2>/dev/null redirection of stderr.

$ find / -mount -name whatever 2>/dev/null


Last edited by stress_junkie; 03-11-2006 at 05:31 PM.
 
Old 03-11-2006, 06:35 PM   #7
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
Quote:
Originally Posted by stress_junkie
$ find / -mount -name whatever 2>/dev/null
Cool. I didn't know that stderr could be redirected so simply.

I had found out about using exec 2>/dev/null, but this only seems to be useful from within a shell script, as on the command line it leaves me without the command prompt, or any echo of what I'm typing.

I know that this wasn't the main point of the thread, but I will find it useful.

Thanks,
Rob
 
  


Reply


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
WARNING: Hard link count is wrong for /proc Fr33B5D Linux - General 1 08-30-2005 06:41 PM
Warning on running "find" command satimis Linux From Scratch 1 08-06-2005 11:45 AM
Can't find "Configure my computer" link mmorales Mandriva 4 03-01-2004 12:56 AM
Small linux giving "Warning: dev (4:01)...." error during bootup. WJWhite Linux - Newbie 1 01-23-2004 11:03 PM
make error "libtool: link: cannot find the library `' " jdolluc Linux - Software 2 10-15-2003 09:51 PM

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

All times are GMT -5. The time now is 11:14 PM.

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