Re: find vs ls performance for walking folders, are there any faster options?

2012-12-13 Thread Olav Grønås Gjerde
Thank you, that was a really good answer. On Wed, Dec 12, 2012 at 3:50 PM, Bruce Evans wrote: > On Wed, 12 Dec 2012, [ISO-8859-1] Olav Grønås Gjerde wrote: > >> I'm working on scanning filesystems to build a file search engine and >> came over something interesting. >&

find vs ls performance for walking folders, are there any faster options?

2012-12-12 Thread Olav Grønås Gjerde
I'm working on scanning filesystems to build a file search engine and came over something interesting. I can walk through 300 000 folders in ~19.5seconds with this command: ls -Ra | grep -e "./.*:" | sed "s/://" With find, it surprisingly takes ~50.5 seconds.: find . -type d My results are based