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

Re: ls -alR with wd?



Tzafrir Cohen wrote:
> On Thu, Jun 10, 2010 at 10:58:58PM +0200, Merciadri Luca wrote:
>   
>
> Others already mentioned location. I'll just note that 'find' and 'ls
> -lR' should have comparable speeds. find's output should be nicer to
> parse.
>
> A single 'find' is normally enough to cache the relevant directories.
>   
Well, you first need to do _one_ find before for both to have the same
speed. That's the problem. Locate seems to do what I want.
> E.g.:
>
> real    3m48.317s
> user    0m1.568s
> sys     0m7.948s
> tzafrir@sweetmorn:~$ time find /usr >/dev/null
>
> real    0m13.977s
> user    0m0.772s
> sys     0m1.532s
> tzafrir@sweetmorn:~$ time find /usr >/dev/null
>
> real    0m0.956s
> user    0m0.332s
> sys     0m0.616s
> tzafrir@sweetmorn:~$ time find /usr >/dev/null
>
> real    0m0.968s
> user    0m0.372s
> sys     0m0.576s
>
> Actually the second 'find' took way longer than I expected.
>
> $ free
>              total       used       free     shared    buffers cached
> Mem:       2051620    1965084      86536          0     253852 284188
> -/+ buffers/cache:    1427044     624576
> Swap:      2000968     118404    1882564
>   
Thanks.

-- 
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
I use PGP. If there is an incompatibility problem with your mail
client, please contact me.


There are only two tragedies in life: one is not getting what one wants,
and the other is getting it. (Oscar Wilde)

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: