Python删除当前目录下的所有缓存文件

删除当前目录下的所有__pycache__子目录

find . -name '__pycache__' -type d -exec rm -rf {} \;

删除当前目录下所有.pyc文件

find . -name "*.pyc" | xargs rm -f
posted @ 2023-05-11 14:25  liuyang9643  阅读(70)  评论(0编辑  收藏  举报