4 ms·
Yes, this is an issue, absolutely. I've seen some image directories with more than a million files in them.
by TylerE 2y ago
Yes, this is an issue, absolutely.
I've seen some image directories with more than a million files in them.
- genrilz 2y agoThis shouldn't overrun the command line length for resize, since resize only gets fed one filename at a time. I do think that the for loop would need to hold all the filenames in a naive shell implementation. (I would assume most shells are naive in this respect) The for loop's length limit is probably the amount of ram available though. I find it improbable that one could overflow ram with purely pathnames on a PC, since a million files times 100 chars per file is still less than a gig of ram. If that was an issue though, one would indeed have to use "find" with "-exec" instead to make sure that one was never holding all file names in memory at the same time.