Skip to content

Instantly share code, notes, and snippets.

@tribou
Created February 21, 2016 15:33
Show Gist options
  • Save tribou/7c8791bbb1337f3833c4 to your computer and use it in GitHub Desktop.
Save tribou/7c8791bbb1337f3833c4 to your computer and use it in GitHub Desktop.
List file and folder sizes in current directory with bash
#!/bin/bash
# Example usage: sizes path/to/somewhere/
sizes ()
{
ls -lrt -d -1 ${PWD}/${1}* | xargs du -sh
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment