Bug #2894
closedls(1) -1U can go much faster
100%
Description
By default, ls(1) reads the entire contents of a directory into memory, sorts the entires, and calculates how to optimally show the output in columns. This is usually the right thing, but when a user wants only a simple unsorted list of files, saving them all in memory before printing a single one is counterproductive.
The -1 and -U options indicate that there should be one file printed per line and the output will be unsorted. When those are present, ls(1) shouldn't save each file in memory. Instead, it should print each entry as it reads them from readdir(3C).
If there are options present which require sorting (-S, -t) or additional output (-l, -i, -R, etc.), then ls(1) should work as usual.
Updated by Rich Lowe over 11 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Resolved in r13734 commit:41fe4dd8e23d