News for hackers. Stuff that matters.
Re:Find is a beautiful tool by shabble on Sunday July 24, 2011 @07:03PM (#2800590)
The other big gotcha that took a while to sink in was

  find -name "foo*" -or -name "*bar" -print
which should actually be

  find \( -name "foo*" -or -name "*bar" \) -print
to do what you might expect (print things matching beginning with foo or ending with bar)

Without the parens, it gets interpreted as

  -name "foo*" -or ( -name "*bar" -and -print ), 
and hence only prints things that match the latter predicate.

There are no comments on this comment yet.