Find command and pruning .dirs

I'm sure this has been asked before but I couldn't find it with the search. I have a script that looks for files and then moves to another location for further processing. My problem is I can't seem to prune the .s* directories. It doesn't break anything just wanted a cleaner process.

Here is the line I'm using in a bash script

find $FILES -name working -prune -o -name \.s* -prune -o -name "FY2010*" -exec mv {} $FILES/working/perbud/ \;

You could try :

find $FILES -name working -prune -o -name .s\* -prune -o -name "FY2010*" -exec mv {} $FILES/working/perbud/ \;

just tried it and its still trying to search .ssh and other .s dir's...

thanks for trying to help though.

Hi.

Which OS are you using?

On Linux I get a different result than on Solaris!

find $FILES -name FY2010* -print -o -name working -prune -o -name .s* -prune -exec mv {} $FILES/working/perbud/ \;

its a solaris 10 sparc