python 2.7.12 on Linux behaving differently than on Windows

BartC bc at freeuk.com
Tue Dec 6 06:56:26 EST 2016


On 06/12/2016 07:08, Gregory Ewing wrote:
> BartC wrote:

>> And if there's an error in an option, you may have to abort, which
>> means throwing away that list of files which, in some cases, can run
>> into millions.
>
> This "millions of files" thing seems to be an imaginary
> monster you've invented to try to scare people. I claim
> that, to a very good approximation, it doesn't exist.
> I've never encountered a directory containing a million
> files, and if such a thing existed, it would be pathological
> in enough other ways to make it a really bad idea.

Many of my examples are based on actual experience.

One of my machines /did/ have 3.4 million files in one directory.

(The result of Firefox file caching having run amok for the best part of 
a year. Once discovered, it took 15 hours to delete them all.)

In that directory (which was on Windows but accessible via a virtual 
Linux), typing any Linux command followed by * would have required all 
3.4 million directory entries to be accessed in order to build a 3.4 
million-element argv list. I've no idea how long that would have taken.

>>  >DIR *.b *.c

> Not with *that particular syntax*. You would need to
> design the interface of a program to do that some other
> way.

EXACTLY. It's restrictive.

-- 
Bartc




More information about the Python-list mailing list