Eric Roller's Development Blog

UNIX: find -prune w/ or w/o -print

- Posted in General by

An old trap that I keep to be falling into is this one:

> find . -name "Frameworks" -prune -or -name "Info.plist"

Notice how the Frameworks folder is also returned (since -prune defaults to true), but the intention was to exclude it! The solution is to add -print:

> find . -name "Frameworks" -prune -or -name "Info.plist" -print