Originally Posted by sharky
Basically need to find directories named 'setup' while excluding directories name '.snapshot'. Tried several things with prune and '!' and nothing so far has worked.
I guess, you want to search directories named "setup" within your system and want to exclude those directories which also has a name "setup" and are inside ".snapshot" directory... Right? You can try following:
~$ find /path/to/search -type d -name '.snapshot' -prune -o -type d -name 'setup' -print
It will serach for all directories named "setup" and exclude ".snapshot".