Clean all .pyc files from current project. It cleans all the files recursively.

Clean all .pyc files from current project. It cleans all the files recursively. | commandlinefu.com

Clean all .pyc files from current project. It cleans all the files recursively.

Terminal - Clean all .pyc files from current project. It cleans all the files recursively.
find . -name "*.pyc" -exec rm {} \;
2009-02-16 17:15:58
User: nsmgr8
Functions: find rm
Clean all .pyc files from current project. It cleans all the files recursively.

For a python project, sometimes I need to clean all the compiled python files. I have an alias 'rmpyc' to this command. This really saves me a lot of typing and hunting throughout the folders to delete those files.

Alternatives

There is 1 alternative - vote for the best!

Terminal - Alternatives
find . -type f -name "*.pyc" -delete;
原文地址:https://www.cnblogs.com/lexus/p/2821783.html