du is the abbreviation of Disk Usage , used to view the disk space. Unlike the df command, the du command looks at the disk space used by files and directories, not a partition.
Syntax format: du [parameter] [file]
Common parameters:

Example
# 显示指定文件所占空间du -sh file

# 显示文件夹内所有文件大小du -sh dir

# 显示文件夹内所有文件的大小du -ah dir/

This article is reprinted from https://xugaoxiang.com/2022/06/03/linux-cmds-13-du/
This site is for inclusion only, and the copyright belongs to the original author.