4 ms·
When you have a hammer, you hammer out a reimplementation of `ncdu`. I'm a die-hard fan of `du -kx dir | sort -rn | less`.
by falsedan 10y ago
When you have a hammer, you hammer out a reimplementation of `ncdu`.
I'm a die-hard fan of `du -kx dir | sort -rn | less`.
- brendangregg 10y agodo they show multiple levels of subdirectories at the same time? no?
- falsedan 10y agoYou can try running it. yes
- brendangregg 10y agohttp://www.brendangregg.com/blog/images/2017/files_linux49.svg http://www.brendangregg.com/blog/images/2017/files_linux49.s... That's all the files and subdirectories, and multiple levels of subdirectories, shown _at the same time_. Without needing to navigate in and out of directories. If there's a way to do this using ncdu, then I've failed to find it. Screenshot please.
- brendangregg 10y agoBTW, here's my ncdu screenshot: --- /mnt/src/6/linux-4.9-rc5 --------------------- 401.7 MiB [##########] /drivers 135.6 MiB [### ] /arch 37.3 MiB [ ] /fs 35.3 MiB [ ] /include 34.4 MiB [ ] /Documentation 32.2 MiB [ ] /sound 27.6 MiB [ ] /net 13.4 MiB [ ] /tools 7.5 MiB [ ] /kernel 5.9 MiB [ ] /firmware 3.6 MiB [ ] /lib 3.4 MiB [ ] /scripts 3.3 MiB [ ] /mm 3.2 MiB [ ] /crypto 2.3 MiB [ ] /security 1.1 MiB [ ] /block 880.0 KiB [ ] /samples 424.0 KiB [ ] /virt [...] I don't see subdirectories. Linux source is here: https://www.kernel.org/ https://www.kernel.org/
- vacri 10y agoWhile you're going bananas on the pros of flame graphs, a significant con is that most of the names are unreadable. In your example, the legible information is not much more than what 'du -skh linux-4.9-rc5/*' would give you.
- brendangregg 10y agoYou can click to zoom, but in the default output I wouldn't call it a significant con anyway. It's usually (not always) an advantage. Take that ncdu output above: "/drivers" is visible in the flame graph, whereas "/virt" is not. It's only printing the names of the largest rectangles -- the ones you care about, helping draw your attention to where it should be drawn.
- AckSyn 10y agoI like using some variations in syntax for du -h / with recursive looking for file over a certain size. Very handy.
- e12e 10y agoI prefer "du -h|sort -h" (for new versions of GNU sort, that support sorting "human readable" sizes.
- falsedan 10y agoOh nice, time to update the muscle-memory firmware.
- gradstudent 10y agoThis comment (and its immediate child) really should be at the top. Simple. Elegant. No need to install Yet Another Dumb App.