Run ls command faster on folder with many files or directories

Running ls on a folder with many files or folders in it (>20 000) can take minutes or even hours. To speed up the process you can combine the unsorted output of ls (which is fast) with the sort command, like this:

ls -U | sort

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is allowed in comments.