LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 03-04-2008, 12:48 PM   #1
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy jessie
Posts: 1,436

Rep: Reputation: 83
find path and trailing "/"


Hya,

My Debian lenny, (I do not know when it started)
Code:
find /usr -name fileToFind -print
does not work, while
Code:
find /usr/ -name fileToFind -print
works.

I checked MacOSX and Solaris, and both forms work. (MacOSX returns like
Code:
>find /usr/ -name find -print
/usr//bin/find
>
)

At this moment, I do not have access to other Linux.

Is trailing "/" required in POSIX?

I appreciate any comments.

Happy Penguins!

Last edited by kaz2100; 03-04-2008 at 12:49 PM. Reason: typo
 
Old 03-04-2008, 12:55 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Look at the output of "ls -lad /usr". If it is a link (begins with lrwxrwxrwx) then your first find is treating like a file, and goes no further while the second treats it like a directory and continues. If the output of the above ls command is a directory (begins w/ drwxr...), then it will need more investigation.

HTH

Forrest

Last edited by forrestt; 03-04-2008 at 12:57 PM.
 
Old 03-04-2008, 03:10 PM   #3
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy jessie
Posts: 1,436

Original Poster
Rep: Reputation: 83
Hya

Thanks forrestt: /usr is a directory, not a link. Need more investigation....

Happy Penguins!
 
Old 03-04-2008, 03:33 PM   #4
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
OK, found it. There was a bug in find. It was fixed in late November 2007.
Here is the bug report:

http://savannah.gnu.org/bugs/index.php?20970

If you update findutils, this should go away.

HTH

Forrest
 
  


Reply

Tags
find, path


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
How to find the path to the "Mount" executable file in RHEL4? elitt2 Red Hat 4 10-08-2007 10:22 AM
starting vnc couldn't find "xauth" on your PATH. verlossen Linux - Networking 6 08-21-2006 04:57 PM
configure: error: Can't find "javac" in your PATH, when install/compile a program... JungMin Programming 5 12-07-2005 05:04 PM
configure: error: Can't find "javac" in your PATH, when install/compile a program... JungMin Linux - Software 4 12-05-2005 11:20 PM


All times are GMT -5. The time now is 08:44 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration