by geosh · 3y ago · 0 comments
This will also be faster, because you fork less.
du -a will need to do a stat to get the file size, which is comparatively expensive; I don't think find will (not sure)?
Yes, those stat() calls can be very slow in aggregate on a large tree, especially from HDD (due to seeking) or network filesystem, if the stat information isn't already in cache.
Im not sure how one can do \0 separator with du, plan9's du(1) doesn't list such option.