Delete all the .pyc!

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