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

王林
Release: 2020-03-30 13:29:24
Original
5054 people have browsed it

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
Copy after login

View the size of the specified folder

du -h /data
Copy after login

(recommended Tutorial: centos tutorial)

View the size of all files in the specified folder

du -h /data/
Copy after login

View the size of the specified file

du -h data.log
Copy after login

View the directory mount point

df /data
Copy after login

Add -kh to display in g units

df /data -kh
Copy after login

View the disk space size

df -h
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template