Nix: Find the total size of files within a directory

less than 1 minute read

Say you need to find the total size of jpegs within a directory with subdirectories. The following command has you covered:

find ./photos/john_doe -type f -name '*.jpg' -exec du -ch {} + | grep total$

Via SO.

Tags: ,

Categories:

Updated:

Comments