Re: A du puzzle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Tom Hansen wrote:
Why is it that

  du -x | grep "^[^/]*/[^/]*$"

is much faster than

  du -sx *

??


In what order did you execute the commands? Might be that the info was still in memory. Just look at the timed sequence below.

Kind regards,

Herta

# time du -x | grep "^[^/]*/[^/]*$"
(...)
real    1m11.196s
user    0m1.544s
sys     0m4.988s

# time du -sx *
(...)
real    0m1.482s
user    0m0.312s
sys     0m1.048s

# time du -x | grep "^[^/]*/[^/]*$"
(...)
real    0m1.845s
user    0m0.592s
sys     0m1.084s

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux