Reputation: 167
All the examples I read using find and -prune never seem to have the find looking for a specific filename. Let' say I want to do a search from root looking for any files on the system named "abc", I'd usually use:
find / -name "abc"
But now I want the same search, but I don't want to include any searches through /mnt or /tmp. How can I use prune in this situation?
Thanks
Upvotes: 0
Views: 95
Reputation: 26800
You can use :
find / \( -path /mnt -o -path /tmp \) -prune -o -name "abc"
Upvotes: 1