Reputation: 173
How can I exclude multiple folders from search in linux? In the folder "home/Stand" i use the command to search:
i use the command to search:
find ./ -name "fesb-6.2.1.1.tar.gz"
I am getting a lot of results from unnecessary folders in this directory, how can I exclude multiple folders from search?
find ./ -name fesb-6.2.1.1.tar.gz -not -path "6.2.1-pbo" did not work
Upvotes: 0
Views: 97
Reputation: 3582
Give a try, it should work:
find ./ -name fesb-6.2.1.1.tar.gz ! -path '*6.2.1-pbo*'
Upvotes: 3