How to the number of files in a directory ls | wc -l works well for me.http://stackoverflow.com/questions/3702104/find-the-number-of-files-in-a-directoryRelated posts:How to sort all files recursively by modification time in a directory on Linux? How to get files without certain strings in their files names (reverse of *string*) on Linux? How to run screen on a Linux host reporting “Cannot make directory ‘/var/run/screen’: Permission denied”? How to watch a directory size in Linux Shell How to get a user’s home directory from the username in a variables in Bash? How to find files in a directory that are larger than certain size? How to find top K largest files in a directory on Linux? How to iterate all files and directories under a directory in Python?