I use ls -l *.filetype | wc -l
but it can only find files in current directory.
How can I also count all files with specific extension in its sub dirs?
Thank you very much.
Use File Explorer Open the folder and select all the subfolders or files either manually or by pressing CTRL+A shortcut. If you choose manually, you can select and omit particular files. You can now see the total count near the left bottom of the window. Repeat the same for the files inside a folder and subfolder too.
You can see the file count by enabling Status Bar in Finder. To do this, click View -> Show Status Bar on the menu bar, or press Command + /.
You can do that with find
command:
find . -name "*.filetype" | wc -l
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With