I need some help getting the find
command to work right in a script working on. I need to be able to exclude some directories. Below I have what I'm doing as a work around.
sudo find / ( -name firefox -o -name thunderbird -o -name seamonkey \) -type f 2>/dev/null|grep -v '(10_Recommended|repo)'
I would like to exclude some directories so the script or find
command doesn't take so long.
In the example above I want to exclude /export/repo
, which is an NFS mount and /10_Recommended*
which is the start of a patchset used on Solaris server. The current one being an example like: /10_Recommended_CPU_2014-01
.
I have tried using -prune
and !
statements and it's just not working. Can someone give me a hand with this?
I'm tuning this command on Solaris 10, RHEL 5, SLES 11 SP2.