2020
10-09
10-09
Linux删除文件不同方法效率对比
测试一下Linux下面删除大量文件的效率。首先建立50万个文件$testforiin$(seq1500000);doechotext>>$i.txt;done1.rm删除$timerm-f*zsh:sureyouwanttodeleteallthefilesin/home/hungerr/test[yn]?yzsh:argumentlisttoolong:rmrm-f*3.63suser0.29ssystem98%cpu3.985total由于文件数量过多,rm不起作用。2.find删除$timefind./-typef-execrm{}\;find./-typef-execrm{}...
继续阅读 >