filesystem

Get number of all files

When number of file is small, less than 10, 000

$ ls -ls *.<ext> | wc -l

When more than 10, 000 files

$ find -type f -name '*.<ext>'  | wc -l

Storage usage

Check disk partition usage

$ df -h

Check the size of a directory

$ du -hs <directory>

Check size of all subdirectories

$ du -hs *