Last active
January 24, 2018 15:19
-
-
Save addiedx44/5297971 to your computer and use it in GitHub Desktop.
List large files in order of size
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
sudo du -h / 2>/dev/null | grep '^\([0-9.]*G\|[0-9]\{3,\}M\)' | sort -h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bah, accidentally deleted my comment :P
Randomly saw this on the gists home page, just wanted to let you know about the -k flag to sort.
du | sort -k 1 -g
What I wanted to say, was that I liked the
-h
flag which doesn't exist on OS X's version of sort.du -h | sort -k 1 -h