無聊的 一個用 Golang 編寫的華麗的 Linux 磁盤監控實用程序。 它在 MIT 許可下發布,支持 Linux、macOS、BSD 甚至 Windows。

杜甫的特點

所有已安裝設備的易於理解的概述。能夠指定目錄/文件名並檢查該掛載點上的可用空間 從輸出中更改/刪除列 對 inode 信息進行排序 為輸出排序 JSON 輸出 支持主題規範..不會自動檢測設備主題

如何在 Debian / Ubuntu Linux 上安裝 duf

使用 wget 命令或 curl 命令下載文件。

$ https://github.com/muesli/duf/releases/download/v0.6.2/checksums.txt
$ wget https://github.com/muesli/duf/releases/download/v0.6.2/duf_0.6.2_linux_amd64.deb
$ sha256sum --ignore-missing -c checksums.txt

然後將 duf.deb 包安裝到 Debian 或 Linux Mint 包中。

$ sudo apt install ./duf_0.6.2_linux_amd64.deb

如何使用 Duf 磁盤監控實用程序

現在,只需從終端輸入 duf 即可啟動應用程序。

如果您想一目了然地查看 duf 中可用的所有命令,您可以鍵入:

$  duf --help
Usage of duf:
  -all
    	include pseudo, duplicate, inaccessible file systems
  -hide string
    	hide specific devices, separated with commas:
    	local, network, fuse, special, loops, binds
  -hide-fs string
    	hide specific filesystems, separated with commas
  -inodes
    	list inode information instead of block usage
  -json
    	output all devices in JSON format
  -only string
    	show only specific devices, separated with commas:
    	local, network, fuse, special, loops, binds
  -only-fs string
    	only specific filesystems, separated with commas
  -output string
    	output fields: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem
  -sort string
    	sort output by: mountpoint, size, used, avail, usage, inodes, inodes_used, inodes_avail, inodes_usage, type, filesystem (default "mountpoint")
  -style string
    	style: unicode, ascii (default "unicode")
  -theme string
    	color themes: dark, light (default "dark")
  -version
    	display version
  -warnings
    	output all warnings to STDERR
  -width uint
    	max output width
僅限本地 voew

您只能通過將特定文件系統或設備作為參數傳遞來打印它。我使用單個分區創建了這台機器,因此所有內容都安裝在根目錄 (/) 上。將根據分區方案顯示不同的輸出。

$ duf /home /usr /opt
$ duf /root/
$ duf /var/log

另一個示例是根據大小按特定順序對輸出進行排序。這是您需要輸入的內容:

duf --sort size

輸出如下所示:

按大小排序

你可以通過 --all 用於顯示偽、不可訪問、重複文件系統的標誌。

$ duf -all

您可以選擇僅打印特定列,繞過列名作為參數 --output flag. Example:

$ duf --output used,size,avail,usage
Duf-自定義輸出

你可以探索一下 GitHub頁面 附加命令和安裝說明的詳細信息。

你知道類似這個工具的東西嗎?在下面的評論中讓我知道您的想法。