Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Automatically distributing and finding files in subdirectories

by shmem (Chancellor)
on Jul 18, 2006 at 07:42 UTC ( [id://561948]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://561948]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-20 07:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found