Rocky Linux8で各ディレクトリの容量を確認

2021年11月5日

環境
# cat /etc/redhat-release
Rocky Linux release 8.4 (Green Obsidian)

書式
-h 単位 -d 階層数
操作例
1階層の各ディレクトリの容量を確認

# sudo du -h -d 1 | sort -h
0       ./.pki
0       ./Desktop
0       ./Documents
0       ./Downloads
0       ./Music
52K     ./.var
96K     ./.config
332K    ./.local
384K    ./helloworld
6.9M    ./.templateengine

2階層の各ディレクトリの容量を確認

# sudo du -h -d 2 | sort -h
0       ./.cache/evolution
0       ./.cache/gnome-calculator
0       ./.cache/libgweather
0       ./.config/gconf
4.0K    ./.dotnet/corefx
4.0K    ./.nuget
4.0K    ./.nuget/NuGet
8.0K    ./.rbenv/.github
8.0K    ./.rbenv/completions
8.0K    ./.rbenv/rbenv.d
32K     ./.rbenv/src
44K     ./.cache/deno
48K     ./.rbenv/shims

 

Rocky Linux 8

Posted by arkgame