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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-10-2006, 04:02 AM
|
#1
|
LQ Newbie
Registered: Feb 2006
Location: The Country Music Capital
Distribution: Gentoo
Posts: 10
Rep:
|
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!
|
|
|
03-10-2006, 09:09 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
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)...
|
|
|
03-10-2006, 09:54 PM
|
#3
|
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873
|
You could always try an fsck on the system partition.
shutdown -Fr now
The -F will force an fsck when the system starts.
|
|
|
03-10-2006, 10:11 PM
|
#4
|
LQ Newbie
Registered: Feb 2006
Location: The Country Music Capital
Distribution: Gentoo
Posts: 10
Original Poster
Rep:
|
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
|
|
|
03-10-2006, 10:29 PM
|
#5
|
LQ Newbie
Registered: Feb 2006
Location: The Country Music Capital
Distribution: Gentoo
Posts: 10
Original Poster
Rep:
|
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.
|
|
|
03-11-2006, 06:28 PM
|
#6
|
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873
|
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 06:31 PM.
|
|
|
03-11-2006, 07:35 PM
|
#7
|
Member
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 03:14 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|