Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It’s not “ls -1” but “--sort=none” or “-U”.


"ls -f" in POSIX ls (which GNU ls also implements). Also, avoid "-F", which will stat each file.


`ls | more` works too, right?


At least with GNU ls, 'ls | more' does not disable sorting. It disables automatic color (which is important -- coloring requires 'stat(2)'ing every file in the directory).


No - it still does all of the work to sort the entries, which is the slow part since it prevents the first entry from being displayed until the last has been retrieved.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: