Timeline for How do I get the size of a directory on the command line?
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 24, 2022 at 14:45 | comment | added | honzajde | to avoid the line for current directory in the result, just add star (idea from Pacifist, above): du -h --max-depth=1 * | sort -h | |
| Dec 21, 2020 at 18:11 | comment | added | random-forest-cat | just wanted to note that on osx du appears to use -d instead of --max-depth | |
| Feb 3, 2018 at 6:35 | comment | added | Armfoot | @richhallstoke if you use ncdu the files are sorted by descending size by default. | |
| S Oct 17, 2017 at 3:05 | history | suggested | datatype_void | CC BY-SA 3.0 | Grammar improvements |
| Oct 17, 2017 at 0:39 | review | Suggested edits | |||
| S Oct 17, 2017 at 3:05 | |||||
| Jul 13, 2016 at 9:41 | comment | added | richhallstoke | It seems on some (perhaps older?) versions of linux, sort does not have an h switch, and therefore the next best command I could find is: du -c --max-depth=1 | sort -rn | |
| S Feb 19, 2015 at 19:08 | history | suggested | somethingSomething | CC BY-SA 3.0 | Just a little formatting. |
| Feb 19, 2015 at 18:55 | review | Suggested edits | |||
| S Feb 19, 2015 at 19:08 | |||||
| Feb 19, 2015 at 17:32 | history | answered | Chrispie | CC BY-SA 3.0 |