Execute the following command:
View the size of all files in the current folder
du -sh
View the size of the specified folder
du -h /data
(recommended Tutorial: centos tutorial)
View the size of all files in the specified folder
du -h /data/
View the size of the specified file
du -h data.log
View the directory mount point
df /data
Add -kh to display in g units
df /data -kh
View the disk space size
df -h
Related video tutorial recommendations:linux Video tutorial
The above is the detailed content of How to check the size of a folder or file under centos. For more information, please follow other related articles on the PHP Chinese website!