Fast Linux file count for a large number of files
By default ls sorts the names, which can take a while if there are a lot of them. Also there will be no output until all of the names are read and sorted. Use the ls -f option to turn off sorting. ls -f | wc -l Note: This will also enable -a, so ., … Read more