From: Merciadri Luca on
Jordan Metzmeier wrote:
> On 06/10/2010 04:58 PM, 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.
>
>
> Have you tried using locate? locate builds a database of files (using
> updatedb) so searching is faster.
>
> IMO find is best used when you want to perform some action on the files
> found.
>
`locate' is really, really, really, really faster. I had no knowledge
about it. Thanks a lot.

--
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.


Little things affect little minds. (Benjamin Disraeli)

From: Boyd Stephen Smith Jr. on
On Thursday 10 June 2010 15:58:58 Merciadri Luca wrote:
> 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.


You can't. Use find correctly. If you do, it will always be faster than (ls
-alR | grep $stuff).
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss(a)iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
From: Jordan Metzmeier on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 06/10/2010 04:58 PM, 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.
>

Have you tried using locate? locate builds a database of files (using
updatedb) so searching is faster.

IMO find is best used when you want to perform some action on the files
found.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBCAAGBQJMEVN3AAoJEKj/C3qNthmTZjMP/iGZrUqJ1g6JtePw+lGgg1KV
CapM37ta2KzceroBkzp4W5SJx07s6j8rhHrIKrl0GfWIk9gi4MGW70sajg/nxYB5
vdayoAwW6BuJisLz3+31QzaCo9IAWFkJMGk0e7rwvizZTsjfSF6rHQxCqdTXvCeI
2r3/pte4oCX/PCuM5YhMmmK43hsmaO4/qOdToFoXPSj4Pc+TqlF6sJEykw2IL6HY
qaAuIH7ymn+deqQsvaqscMxH04+Xt63iJ/MW0rsyd8GTiWBMTqPKGhakgeZ70/sl
wU7qUWVh4OJeJu7GKyqSBM1SGr0I4pyZwRGQUCknkSsWo25oDieH1PJduDMXOffy
uynKOJ4Oo1J0JOuIhZoFeQZjr95NqyrBcqOA/TtPE1RvFYwqIg03FeO1qHmRo/QZ
JfMeuVoDyFnLuN9TLbtFLGUD1UqtyB8M4q817q+vSMUURqkiWnW8muuLI56mlD1Q
sFRk8kLlFO+bHUp3qEJ5QK+WR27xolXtUQ/k/VxQO6aMkH9qfwS9MBs9PxtjJ4H2
BqiyICIH4n3VEJYllGoIpKPQeT55X4KcHLO1ZlJhLEhySozBnQ96VvMzLnwGCkdJ
qAnF+N5/YhDbScZKmWeFXrdvyws0dup1Cfz/naphTJnZ4qQ0t0CLX52bDPycyf++
Y004wehF8WqjK1Y9UDqn
=fi/F
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4C115377.4080008(a)gmail.com
From: Merciadri Luca on
Boyd Stephen Smith Jr. wrote:
> On Thursday 10 June 2010 15:58:58 Merciadri Luca wrote:
>
>
>
> You can't. Use find correctly. If you do, it will always be faster than (ls
> -alR | grep $stuff).
>
And what means `use find correctly?' Is `find . -name mystuff' so bad?

--
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.


If you fake it, you can't make it.

From: Camaleón on
On Thu, 10 Jun 2010 22:58:58 +0200, Merciadri Luca wrote:

> I find `find' very inefficient when trying to find some files.

(...)

I've got a "one-liner" saved:

***
find /directory/to/find/* -type f -exec grep -H 'text' {} \;
***

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/pan.2010.06.10.21.46.11(a)gmail.com