Daniel Brumbaugh Keeney
3/5/2008 8:55:00 PM
On Wed, Mar 5, 2008 at 2:32 PM, Rodrigo Bermejo
<rodrigo.bermejo@ps.ge.com> wrote:
> If you just need to list the name of the files, du is faster than ls
> du -a should make it.
>
> -r.
First of all, that's using the wrong tool for the job. The job of ls
is to list files, du is for estimating file space usage. Second of
all, on my system at least, you're wrong about speed:
$ time ls -1>/dev/null
real 0m0.013s
user 0m0.004s
sys 0m0.008s
$ time du -a>/dev/null
real 0m0.080s
user 0m0.004s
sys 0m0.020s
the -1 on ls is to prevent formatting of the results
Daniel Brumbaugh Keeney