A du puzzle
Herta Van den Eynde
herta.vandeneynde at cc.kuleuven.be
Tue Aug 1 19:35:44 UTC 2006
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
More information about the redhat-list
mailing list