Linux disk visualization tool - ncdu

场景:磁盘空间占满后快速查找某个目录(子目录)占用空间大。

ncdu /var

(分析后按左右键查看即可)

ncdu 1.15.1 ~ Use the arrow keys to navigate, press ? for help                                                                                                           
--- /var -------------------------------------
  492.0 MiB [##########] /crash
  165.4 MiB [###       ] /lib
   62.6 MiB [#         ] /cache
   46.9 MiB [          ] /opt
   20.1 MiB [          ] /log
  440.0 KiB [          ] /spool
   20.0 KiB [          ] /tmp
   12.0 KiB [          ] /kerberos
   12.0 KiB [          ] /db
    8.0 KiB [          ] /empty
e   4.0 KiB [          ] /yp
e   4.0 KiB [          ] /preserve
e   4.0 KiB [          ] /nis
e   4.0 KiB [          ] /local
e   4.0 KiB [          ] /gopher
e   4.0 KiB [          ] /games
e   4.0 KiB [          ] /ftp
e   4.0 KiB [          ] /adm
    4.0 KiB [          ]  .updated
@   0.0   B [          ]  lock
@   0.0   B [          ]  mail
@   0.0   B [          ]  run