Recently I found a command that displays the Number of files in a ls command listing:
Above will find the number of files in a directory, and it will send o/p as pipe to the wc -l, which outputs the number of lines in its input.Code:ls -l | wc -l
To display all file including hidden and dot files, try
Code:ls -lA | wc -l

Reply With Quote