On Thu, Jun 10, 2010 at 10:58:58PM +0200, Merciadri Luca wrote: > Hi, > > I find `find' very inefficient when trying to find some files. I prefer > using `ls -alR | grep stuff' The problem is that the related output does > not give me the directory where `stuff' is found. How can I add some row > giving this? Thanks.
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. E.g.: real 3m48.317s user 0m1.568s sys 0m7.948s tzaf...@sweetmorn:~$ time find /usr >/dev/null real 0m13.977s user 0m0.772s sys 0m1.532s tzaf...@sweetmorn:~$ time find /usr >/dev/null real 0m0.956s user 0m0.332s sys 0m0.616s tzaf...@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 -- Tzafrir Cohen | tzaf...@jabber.org | VIM is http://tzafrir.org.il | | a Mutt's tzaf...@cohens.org.il | | best tzaf...@debian.org | | friend -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20100610215821.gw16...@pear.tzafrir.org.il