wc


Count Files in Folder

ls -1 | wc -l

*NOTE: ls -1 will list all files one per line, afterwards we pipe the results to wc which will count the lines and thus the total number of file.
It is up to the user to modify the ls in such way that it will perform more complex operations.

Advertisements