Home >Operation and Maintenance >CentOS >How to check the size of a folder or file under centos

How to check the size of a folder or file under centos

王林
王林Original
2020-03-30 13:29:245119browse

How to check the size of a folder or file under centos

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn