Duf – Linux 的免費磁盤監控實用程序


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

達夫的特點

提供所有已掛載設備的概覽 指定目錄/文件名並檢查該掛載點上的可用空間 不會自動檢測設備的主題

如何在 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

然後在你的 Debian 或 Linux Mint 包中安裝 duf .deb 包。

$ 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
duf - 僅限本地 voew

您可以通過將它們作為參數傳遞來僅打印特定的文件系統或設備。我們用一個分區創建了這台機器,所以所有東西都安裝在根目錄 (/)。根據分區方案,您將看到不同的輸出。

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

另一個示例是根據特定順序的大小對輸出進行排序。你應該輸入:

duf --sort size

輸出如下所示:

duf - 按大小排序

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

$ duf -all

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

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

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

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