5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

dufコマンドが便利そうだった

Posted at

はじめに

サーバー運用をしていると、ディスク容量を確認するケースは多々あるかと思います。
df コマンドや du コマンドを使うケースが多いと思いますが、 良い感じに表示してくれる
duf コマンドというものがあるようなので、試して記事にしました。

環境構築

mac

普通に Homebrew で入る。

brew install duf

入らない場合は、下記で formula として追加した後に実行する。

brew tap muesli/tap && brew install duf

Linux(CentOS)

sudo yum install https://github.com/muesli/duf/releases/download/v0.6.2/duf_0.6.2_linux_amd64.rpm

使ってみる

スクリーンショット 2021-04-13 11.32.21.png

こんな感じで色分けして表示される。

オプション

% 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

参考

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?