Nix: Find the total size of files within a directory
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 --human-readable --total {} + | grep total$
Via SO.
Leave a comment