http://qs1969.pair.com?node_id=561948


in reply to Re: Automatically distributing and finding files in subdirectories
in thread Automatically distributing and finding files in subdirectories

The big problem with linux and directory listing is the expensive lstat call done by ls. I had a case where listing took minutes, the directory contained somewhat over 300.000 files.

The cheapest way to get at the files at the system level is find $dir which doesn't call lstat.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^3: Automatically distributing and finding files in subdirectories
by rodion (Chaplain) on Jul 18, 2006 at 12:02 UTC
    Dohhh! Thanks for bringing up the lstat in ls. I'll update the previous post so no one gets mis-lead.