Reputation: 297
I have level1//a/0.jpg , level1//b/0.jpg
I want to exclude 0.jpg in b directory and do some sed.... but having this it doesn't work
find level1/ -name 0.jpg -prune level1/b -exec sed ....
Upvotes: 0
Views: 28
Reputation: 60527
I think you've misunderstood what -prune
does. It sound like you actually want -not -path
like so:
find level1 -name 0.jpg -not -path 'level1/b/*'
Upvotes: 1