LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-09-2005, 02:41 PM   #1
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Rep: Reputation: 15
Find command ?


Why will
Code:
find / -iname xinitrc
return the following:

Code:
/etc/X11/xinit
/etc/X11/xinit/xinitrc.d
/etc/X11/xinit/xinitrc
/usr/X11R6/lib/X11/xinit
/usr/X11R6/bin/xinit
/usr/X11R6/man/man1/xinit.1x.gz
but not return:

/usr/lib/X11/xinit/xinitrc

I know the file is there. Please see the following ls command and its return.

Code:
[root@localhost root 03:31 PM]# ls /usr/lib/X11/xinit/
Xclients  xinitrc  xinitrc.d
Is the find command limited to searching a predefined path of directories? I didn't thin it was.

Thanks all
 
Old 08-09-2005, 02:48 PM   #2
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
corrected question

Why will the following command:
find / -iname "*xinitrc*"

return the following:
/etc/X11/xinit
/etc/X11/xinit/xinitrc.d
/etc/X11/xinit/xinitrc
/usr/X11R6/lib/X11/xinit
/usr/X11R6/bin/xinit
/usr/X11R6/man/man1/xinit.1x.gz

but not return:
/usr/lib/X11/xinit/xinitrc

I know the file is there as the ls command ls /usr/lib/X11/xinit/
returns:
Xclients xinitrc xinitrc.d

Is the find command limited to searching a predefined path of directories? I didn't thin it was.

Thanks all
 
Old 08-09-2005, 04:44 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
To answer your question: no - find isn't limited to certain
search-paths. But the thing that REALLY puzzled me in
your output that it should be returning things like:
/usr/X11R6/lib/X11/xinit
/usr/X11R6/man/man1/xinit.1x.gz
if you search for *xinitrc*

What does
ls -l `which find`
say?


Cheers,
Tink
 
Old 08-09-2005, 05:12 PM   #4
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
I'm with ya. I'm confused too.

Code:
[root@localhost root 06:04 PM]# ls -l `which find`
-rwxr-xr-x    1 root     root        51028 Jan 24  2003 /usr/bin/find
[root@localhost root 06:04 PM]#
FYI
Code:
[root@localhost root 06:09 PM]# ls /usr/X11R6/lib/X11/xinit
Xclients  xinitrc  xinitrc.d
[root@localhost root 06:09 PM]# ls /usr/X11R6/man/man1/xinit.1x.gz
/usr/X11R6/man/man1/xinit.1x.gz
 
Old 08-09-2005, 05:33 PM   #5
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
I was messing with a --maxdepth # option the other day. I thought it was an option for the rpm --query command. But now I don't see --maxdepth as an rpm option.

Perhaps I inadvertantly reconfigured the find command with the --maxdepth option. But how I did it, I don't know.

Ah... such is my life as a newbie.
 
Old 08-09-2005, 09:42 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
You didn't. Find won't set any "permanent options" unless
you explicitly define an alias with a certain invocation.

And it still doesn't explain why it should be using something
like a phonetic search. xinitrc shouldn't give you a xinit.
FULL STOP.


Cheers,
Tink
 
  


Reply



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/grep command to find matching files, print filename, then print matching content stefanlasiewski Programming 9 06-30-2016 05:30 PM
find command slack66 Slackware 8 03-14-2005 03:17 PM
help with the find command clockworks Linux - Software 2 02-17-2004 04:24 PM
find command talkinggoat Linux - Newbie 4 10-05-2003 02:04 AM
Find Command chrisk5527 Linux - General 3 04-19-2003 06:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:18 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