OSX 安裝磁盤分析工具ncdu

ncdu是磁盤目錄占用空間分析工具,支持了很多系統(tǒng)平臺, 是du的 curses-based 版本。代理事用 c寫的。官網地址https://dev.yorhel.nl/ncdu

安裝

OSX用brew安裝

brew install ncdu 

brew默認把可執(zhí)行文件放在在/usr/local/bin/目錄,你也可以在這里看到ncdu。

使用

ncdu -h
 -h                         This help message
  -q                         Quiet mode, refresh interval 2 seconds
  -v                         Print version
  -x                         Same filesystem
  -r                         Read only
  -o FILE                    Export scanned directory to FILE
  -f FILE                    Import scanned directory from FILE
  -0,-1,-2                   UI to use when scanning (0=none,2=full ncurses)
  --si                       Use base 10 (SI) prefixes instead of base 2
  --exclude PATTERN          Exclude files that match PATTERN
  -X, --exclude-from FILE    Exclude files that match any pattern in FILE
  --exclude-caches           Exclude directories containing CACHEDIR.TAG
  --confirm-quit             Confirm quitting ncdu

1.最簡單使用就是ncdu [文件夾]

ncdu dir

掃描dir文件夾。

2.掃描本機:

ncdu / --exclude /Volumes

如果你掛了移動硬盤或連了網絡硬盤, 加了個 --exclude 的參數(shù),掃描時,他會跳過其他掛載點

掃描結果出來后,可以按 ?出來提示:

Paste_Image.png

使用數(shù)字鍵1、2、3進行切換,1為快捷鍵,2為顯示格式說明,3為ncdu版權信息。
常用快捷鍵
n :按文件名進行排序
s :按文件大小進行排序
r :重新統(tǒng)計當前文件夾大小
g :用#或百分比顯示各文件/目錄的大小所占的百分比
i :顯示當前文件/目錄信息

du

linuxdu命令也查看使用空間。du -sh *能看到這一級目錄的結果.

類似的項目

  • gt5 - Quite similar to ncdu, but a different approach.

  • tdu - Another small ncurses-based disk usage visualization utility.

  • TreeSize - GTK, using a treeview.

  • Baobab - GTK, using pie-charts, a treeview and a treemap. Comes with GNOME.

  • GdMap - GTK, with a treemap display.

  • Filelight - KDE, using pie-charts.

  • KDirStat - KDE, with a treemap display.

  • QDiskUsage - Qt, using pie-charts.

  • xdiskusage - FLTK, with a treemap display.

  • fsv - 3D visualization.

  • Philesight - Web-based clone of Filelight.

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • afinalAfinal是一個android的ioc,orm框架 https://github.com/yangf...
    passiontim閱讀 15,569評論 2 45
  • 如果我不能等待到你回心轉意,那么我們就此結束!又或許這個世界根本沒有回心轉意的感情,不是嗎? 如果有,你不會看不...
    璀璨的人生閱讀 180評論 0 0
  • 為什么? 有些人得到真愛,易如反掌 有些人,卻要幾經波折 我也希望,我會是前者, 但現(xiàn)在看來。。我怕是要落后了
    25e6a8f37b9b閱讀 127評論 0 0