Last active
October 10, 2015 22:12
-
-
Save devm33/9636817 to your computer and use it in GitHub Desktop.
Doing things well in shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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