I have a directory containing several files ending with .pyc
, which I'd like to all remove in one go. I've tried both
find . -name '*pyc' | rm
and
find . -name '*pyc' -exec rm
However, neither of these statements is in accordance with the usage (in the first case) or syntactically correct (in the second case, I get find: -exec: no terminating ";" or "+"
). How can I 'pipe' the results to a 'remove' command?