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*

3
  • 3
    For your first option, can't you just list them with ls -Sl | head? Commented Apr 24, 2012 at 18:23
  • No, du traverses the whole directory tree, whereas ls -S only checks the current directory. Commented Jun 5, 2012 at 17:25
  • @jippie Your first command only includes directories. Commented May 14, 2021 at 9:49