+
 新版
2016-11-14 11:08
文章内容讲的都是Linux下的操作,但是标题却未指明,不够严谨。如果细究,请问Mac和Windows下的方法呢
2016-11-14 10:29
这个匹配模式!(*.zip|*.odt)不错,涨知识……
2016-11-14 09:44

引用来自“jianglibo”的评论

如果也能出现在首页,我会写一篇《powershell异于常人的两三事》。介绍powershell如何优雅规范的解决问题。
可以写博客,我们会予以推荐~
2016-11-14 09:37
find+xargs那个解决方案并非最优,用了-I{}之后代表xargs会一个个执行命令,这样性能非常低下,想办法拼接成rm -f file1 file2 ... filen这种方式一把删除才是最佳方案,因此改成这样:

find /directory/ -type f -not -name 'PATTERN' -print0 | xargs -0 rm
2016-11-14 08:49
如果也能出现在首页,我会写一篇《powershell异于常人的两三事》。介绍powershell如何优雅规范的解决问题。
2016-11-14 08:38
看起来像天书,用powershell来解决,就好象是阅读how do you do.

Get-ChildItem startFolder -Recurse | Where-Object Name -Match "\.txt$|\.ps1" | Remove-Item
2016-11-14 07:48
写的非常好
回复 @
{{emojiItem.symbol}}
返回顶部
顶部