Source:
http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html
Conclusion: use 'rsync'
...
(The # of files is 1000000. Each of them has 0 size.)
Command | Elapsed | System Time | %CPU | cs1 (Vol/Invol) |
---|---|---|---|---|
rsync -a –delete empty/ a | 10.60 | 1.31 | 95 | 106/22 |
find b/ -type f -delete | 28.51 | 14.46 | 52 | 14849/11 |
find c/ -type f | xargs -L 100 rm2 | 41.69 | 20.60 | 54 | 37048/15074 |
find d/ -type f | xargs -L 100 -P 100 rm2 | 34.32 | 27.82 | 89 | 929897/21720 |
rm -rf f | 31.29 | 14.80 | 47 | 15134/11 |
...
-----
Cheers,
June
Cheers,
June
댓글 없음:
댓글 쓰기