Skip to content

Instantly share code, notes, and snippets.

@pulketo
Created February 28, 2023 22:07
Show Gist options
  • Save pulketo/898fc6245c95acce5504442996a592ca to your computer and use it in GitHub Desktop.
Save pulketo/898fc6245c95acce5504442996a592ca to your computer and use it in GitHub Desktop.
du by date/hour and size
v1:
find . -type f -printf '%s %TY-%Tm-%Td-%TT\n' | cut -d ":" -f1 | sed 's/$/\n/g' | awk '{b[$2]+=$1} END{for (date in b) print date, b[date]}' | sort
v2:
find . -type f -printf '%TY-%Tm-%Td %TH-%TM %h\n' | sort | uniq -c | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment