I’ve renamed some files in a fairly large project and want to remove the .pyc files they’ve left behind. I tried the bash script:

 rm -r *.pyc

But that doesn’t recurse through the folders as I thought it would. What am I doing wrong?

22 s
22

find . -name "*.pyc" -exec rm -f {} \;

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *