
To count all JPEG files in a hierarchical directory in Linux, an efficient way is to use the find command.
find /path/to/directory -type f -iname “*.jpg” | wc -l
To count all JPEG files in a hierarchical directory in Linux, an efficient way is to use the find command.
find /path/to/directory -type f -iname “*.jpg” | wc -l