Skip to content

Instantly share code, notes, and snippets.

@devm33
Last active October 10, 2015 22:12
Show Gist options
  • Save devm33/9636817 to your computer and use it in GitHub Desktop.
Save devm33/9636817 to your computer and use it in GitHub Desktop.
Doing things well in shell
# Display summarized (s) human-readable (both h) sizes of sub-directories sorted descending
# - remove / to include files in that folder
# - remove r to sort ascending by size
du -sh */ | sort -hr
# Remove broken symlinks (leverages zsh)
rm -- *(-@D)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment