查看当前目录下各个目录大小容量du
du 命令
-H -- follow symlinks on the command line
-I -- ignore files/directories matching specified mask
-L -- follow all symlinks
-P -- do not follow symlinks (default)
-a -- report sizes for all files, not just directories
-c -- display grand total
-d -- display entry for directories up to specified depth
-g -- use block size of 1G-byte
-h -- human readable output
-k -- use block size of 1K-byte
-m -- use block size of 1M-byte
-r -- notify about unreadable files/directories
-s -- only report total for each argument
-x -- skip directories on different filesystems
显示目录
du -sh *
du -sh /opt/
显示文件,不显示目录
du -ah /opt/