LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-05-2006, 01:17 AM   #1
nadavvin
Member
 
Registered: May 2006
Distribution: ubuntu
Posts: 109

Rep: Reputation: 21
How can I find in only particular directories?


How can I find in only particular directories with the find command?
 
Old 08-05-2006, 01:28 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,973
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Depends ... one options would be
echo dir1 dir2 dir3|xargs -i find {} -name "file"

What are you after, exactly?


Cheers,
Tink
 
Old 08-05-2006, 01:39 AM   #3
nadavvin
Member
 
Registered: May 2006
Distribution: ubuntu
Posts: 109

Original Poster
Rep: Reputation: 21
Thanks

I'm installing LFS and I use in find and diff to create package log manager.

but I don't need to check the /dev /proc /home and /root directories.

There is a way to only write the four directories since it's less?
 
Old 08-05-2006, 01:48 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,973
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Untested, but ....
Code:
find . \( -path '/dev' -o -path '/proc' -o -path '/home' -o -path '/root' \) -prune -o -print

Cheers,
Tink
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
find, over quota directories branden_burger Programming 2 11-07-2005 10:34 AM
how to find directories with a space in it :P ToBe Linux - General 4 01-05-2005 01:10 PM
how to find directories created in the last 30 mins? a128 Programming 1 02-04-2004 11:06 PM
Where to find/How to change .h include directories for g++ sfcesario Linux - Software 1 01-31-2004 10:12 AM
Where can I find a good help page on directories? Travis86 Linux - Newbie 3 01-04-2003 10:09 PM


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