Sunday, June 29, 2014

Quick check for directory size using du

The utilities du has a few parameter which could affect timing of checking directory size. But the difference is not that large 

Using du -csh on the current directory 
time du -csh .

real    0m20.485s
user    0m0.308s
sys     0m2.146s

Using du -cmshis rather fast
$ time du -cmsh

real    0m17.306s
user    0m0.266s
sys     0m1.951s

Using du -sh is the longest
$ time du -sh .
544G    .

real    0m21.790s
user    0m0.312s
sys     0m2.289s

No comments: