I\'m trying to figure out the best way to find the number of files in a particular directory when there are a very large number of files (more than 100,000).
When the
This answer here is faster than almost everything else on this page for very large, very nested directories:
https://serverfault.com/a/691372/84703
locate -r '.' | grep -c "^$PWD"