Delete all the .pyc!

Posted: [Source]
Tags:  bash python tip

How to remove leftover .pyc files, when your editor doesn't provide such option? Run simple bash command.

I've been using it for some time, stareted with this:

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

But it can be run much simpler:

find . -name "*.pyc" -delete

And finally, it also can be assigned to bash alias:

alias delpyc='find . -name "*.pyc" -delete'
Comments powered by Disqus