4 ms·
cd / && du -sh *
by foxhop 10y ago
cd / && du -sh *
- thyselius 10y agoWhat does it do?
- foxhop 10y agoIt will list the size of every file and directory in human readable form. Output is related to your present working directory.
- deleted 10y ago[deleted]
- brendangregg 10y agoI'd try that first, and if it didn't find my space, then flame graphs. du's output does the first level of directories, but not subdirectories, and also requires reading of text rather than visually comparing line lengths (easier).
- foxhop 10y agoYou can quickly move toward the problem and continue to run 'du'.
- brendangregg 10y agoIf I'm at the command line already, that may well work. Or, it may not (the initial problem I had, I already knew the high level breakdowns, and was hunting for wasted 1%'s here and there -- the flame graph made it easy to spy everything at once). Another use of the flame graph approach is with automated build software. Imagine automatically generating one with every linux version, to keep track of where growth is.
- deleted 10y ago[deleted]
- slavik81 10y agoIt takes careful inspection to notice the big folders when the units vary. A 25G folder is much larger than both a 43M folder and a 256K folder, but it's not obvious at a glance when you have a big list. Human-readable units are nice, but without them it's easier to sort by size. du -s * | sort -n
- diafygi 10y agosort supports human values du -sh * | sort -h
- diegorbaquero 10y agoNot in Mac :/
- kpil 10y agoThat's BSD's sort, not GNU sort, isn't it?
- oneeyedpigeon 10y agoNot here :( What version of sort are you running?
- e12e 10y agoProbably a recent version of GNU sort. AFAIK "sort -h" dates at least as far back as the version shipped with Debian old-stable.
- oneeyedpigeon 10y agoI'm on macOS 10.12.3, GNU coreutils 5.93, and sort doesn't support the "-h" flag.
- justinsaccount 10y ago