walking a directory with very many files

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Jun 20 04:54:03 EDT 2009


In message <J_Q_l.19655$y61.10309 at news-server.bigpond.net.au>, Lie Ryan 
wrote:

> Lawrence D'Oliveiro wrote:
>
>> In message <%Zv_l.19493$y61.5958 at news-server.bigpond.net.au>, Lie Ryan
>> wrote:
>> 
>>> Yeah, it might be possible to just mv the file from outside, but not
>>> being able to enter a directory just because you've got too many files
>>> in it is kind of silly.
>> 
>> Sounds like a problem with your file/directory-manipulation tools.
> 
> try an `ls` on a folder with 10000+ files.
> 
> See how long is needed to print all the files.

As I've mentioned elsewhere, I had scripts routinely dealing with 
directories containing around 400,000 files.

> Ok, now pipe ls to less, take three days to browse through all the
> filenames to locate the file you want to see.

Sounds like you're approaching the issue with a GUI-centric mentality, which 
is completely hopeless at dealing with this sort of situation.




More information about the Python-list mailing list