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
Same thing happens when I try to use locate. So I used find to ... well find.. slocate or locate and got the following message:
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
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
PS: LQ.org roxors!! WOOT!
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 22.214.171.124)...
You could always try an fsck on the system partition.
shutdown -Fr now
The -F will force an fsck when the system starts.
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
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.
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.
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
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.
|All times are GMT -5. The time now is 09:34 AM.|