Skip to content

Instantly share code, notes, and snippets.

@h00s
Created December 2, 2017 10:29
Show Gist options
  • Save h00s/040dfa860fd05c89326da72059478687 to your computer and use it in GitHub Desktop.
Save h00s/040dfa860fd05c89326da72059478687 to your computer and use it in GitHub Desktop.
Recursively find disk usage of certain file type
#!/bin/bash
#CREDIT: https://unix.stackexchange.com/questions/41550/find-the-total-size-of-certain-files-within-a-directory-branch
find . -type f -name '*.jpg' -exec du -ch {} + | grep total$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment