Unix magic,从目录树中删除所有.pyc文件?

有没有快速方法从目录树中删除所有.pyc文件
如果您已经找到GNU,那么您可能想要
find <directory name> -name '*.pyc' -delete

如果你需要便携的东西,那么你最好

find <directory name> -name '*.pyc' -exec rm {} \;

如果速度是一个大问题,你有GNU find和GNU xargs那么

find <directory name> -name '*.pyc' -print0|xargs -0 -p <some number greater than 1> rm

然而,由于您大部分时间都在等待I / O,因此这不太可能给您带来那么大的加速.

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...