LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How can I find in only particular directories? (https://www.linuxquestions.org/questions/linux-general-1/how-can-i-find-in-only-particular-directories-470943/)

nadavvin 08-05-2006 01:17 AM

How can I find in only particular directories?
 
How can I find in only particular directories with the find command?

Tinkster 08-05-2006 01:28 AM

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

What are you after, exactly?


Cheers,
Tink

nadavvin 08-05-2006 01:39 AM

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?

Tinkster 08-05-2006 01:48 AM

Untested, but ....
Code:

find . \( -path '/dev' -o -path '/proc' -o -path '/home' -o -path '/root' \) -prune -o -print

Cheers,
Tink


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