Skip to content

Instantly share code, notes, and snippets.

@tehcpu
Created April 30, 2017 09:22
Show Gist options
  • Save tehcpu/b9f2d4da5f8e98a3e3df0bdc2cbbc65d to your computer and use it in GitHub Desktop.
Save tehcpu/b9f2d4da5f8e98a3e3df0bdc2cbbc65d to your computer and use it in GitHub Desktop.
unix disk usage program alternative
my_du() {
find $1 -printf "%s\n" | { total=0; while read filesize; do ((total+=filesize)); done; echo $total; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment