However, as ruzam pointed out, the first script isn't much better than ls in that regard. His approach is O(1) in the number of files, a variation of which I've personally used in situations similar to jsiren's.
In reply to Re^2: Managing a directory with millions of files
by mpeg4codec
in thread Managing a directory with millions of files
by jsiren
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |