Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 2
    This is very quick, simple and practical Commented Oct 29, 2012 at 16:43
  • 26
    grep '[0-9]G' contained a lot of false positives and also omitted any decimals. This worked better for me: sudo du -h / | grep -P '^[0-9\.]+G' Commented Aug 14, 2014 at 6:09
  • 1
    @jchavannes -P is unnecessary for this expression because there's nothing specific to Perl there. Also, -P isn't portable to systems that don't have the GNU implementation. Commented Aug 14, 2014 at 18:11
  • 3
    In case you have really big directories, you'll want [GT] instead of just G Commented Mar 28, 2015 at 20:20
  • 33
    I like to use du -h | sort -hr | head Commented Jun 13, 2016 at 18:48