calculate number of files in a directory unix code example Example: how to check how many files are in a folder linux $ ls | wc -l