LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Solaris + find -prune command puzzle (https://www.linuxquestions.org/questions/solaris-opensolaris-20/solaris-find-prune-command-puzzle-624528/)

dazdaz 02-28-2008 12:45 PM

Solaris + find -prune command puzzle
 
Hi,

I would like to find a file named ups_data on the / filesystem but not search in /tmp and /var and not to search on nfs and autofs file system's.

I think that with Solaris you have to use -prune and not ! but I could be wrong. I think the Solaris find functionality is slightly different to Linux's.

For some reason this is'nt working, but I can't seem to progress.

$ find / -fstype nfs -prune -o -fstype autofs -prune -o -type d -name "/tmp" -prune -o -name "ups_data" -print 2>/dev/null


Thank you

jlliagre 02-28-2008 06:29 PM

I would use something like this:
Code:

$ find / \( -fstype nfs -o -fstype autofs -o -name tmp \) -prune -o -name "ups_data" -print


All times are GMT -5. The time now is 04:59 PM.