how to count number of file in a directory in linux code example Example: bash how many files in a directory ls -1q log* | wc -l