gnu - Exclude certain filename patterns and directories from Find -


i'm trying find files not date compared cvs. our cvs structure broken (it not recurse in directories) i'm trying work around find now.

what have this:

for in `find .  -not \( -name "*\.jpg" \) -path './bookshop/mediaimg' -prune -o -path '*/cvs*' -prune -o  -path './files' -prune  -o -path './images/cms' -prune -o -path './internal' -prune -o -path './limesurvey171plus_build5638' -prune  -o -path './gallery2' -prune -o  -print  `; cvs status  "$i" |grep status ; done &>~/output.txt 

but somehow attempt @ excluding images (jpg in case) not work, still show up. have suggestion on how them out of results find?

this failing same reason mixing boolean , and or fails.

what you're saying here (in pseudo-code):

if (     file not named '*.jpg' ,     path matches './bookshop/mediaimg' ,     prone or     path matches '*/cvs*' ,     prune or     path matches './files' ,     prune or     path matches './images/cms' ,     prune or     path matches  './internal' ,     prune or     path matches  './limesurvey171plus_build5638' ,     prune or     path matches  './gallery2' ,     prune or     print ) 

now, print returns true, , think prune well, see none of ands matter if or matches. careful application of parentheses yield results you're after.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -