Home Computer Tutorials Computer Knowledge Query the disk space usage of CentOS system

Query the disk space usage of CentOS system

Feb 20, 2024 am 08:09 AM
Table of contents var occupy

CentOS 系统的磁盘空间占用情况查询

Command introduction

  1. Use the df -h command to view the total capacity and used capacity of each file system. Your output shows that /dev/mapper/centos-root takes up 47% of the space, which is 36G.

  2. Use the du -h -x –max-depth=1 / command to view the size of each subdirectory under the root directory. You can find out the directories that take up a lot of space based on the output, such as /var, /home, /usr, etc.

  3. You can check the size of each subdirectory under the /var directory by running the command du -h -x --max-depth=1 /var. Continue this process until you find a file or directory that takes up more space.

Article recommendation

https://blog.csdn.net/sch_wzq/article/details/105988036

The above is the detailed content of Query the disk space usage of CentOS system. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to insert a table of contents in Google Docs How to insert a table of contents in Google Docs Apr 13, 2023 pm 08:16 PM

Whether it is an article, paper or tutorial, the main highlight of any document is the title and of course the table of contents. It describes the outline structure of the document so that users can get to where and what they expect to read from the document. It's also a best practice to add a table of contents to most documents to make them look more professional. Today, everything happens online and people use Google Docs to create most documents. Many users are still not sure how to insert or add a table of contents in google docs. Therefore, we come up with this article to explain how to create or insert a table of contents in Google Docs. How to Insert a Table of Contents in Google Docs Step 1: Click here to visit Google Docs Online. Step 2: If

What to do if pagefile.sys takes up too much space What to do if pagefile.sys takes up too much space Feb 20, 2024 am 09:01 AM

What should I do if pagefile.sys takes up too much space? In the process of using the computer, we often encounter insufficient memory. In order to solve this problem, the operating system will transfer part of the data in the memory to a special file on the disk. This file is pagefile.sys. But sometimes, we will find that the pagefile.sys file is very large and takes up too much disk space. So, how do we solve this problem? First, we need to clarify the pagefile.sys file

Use java's File.isDirectory() function to determine whether the file exists and is a directory type Use java's File.isDirectory() function to determine whether the file exists and is a directory type Jul 24, 2023 pm 06:57 PM

Use Java's File.isDirectory() function to determine whether a file exists and is of directory type. In Java programming, you often encounter situations where you need to determine whether a file exists and is of directory type. Java provides the File class to operate files and directories. The isDirectory() function can help us determine whether a file is a directory type. The File.isDirectory() function is a method in the File class. Its function is to determine the current File

The glob() function in PHP is used to find files or directories The glob() function in PHP is used to find files or directories Nov 18, 2023 pm 06:17 PM

The glob() function in PHP is used to find files or directories and is a powerful file operation function. It can return the path of a file or directory based on a specified pattern match. The syntax of the glob() function is as follows: glob(pattern, flags) where pattern represents the pattern string to be matched, which can be a wildcard expression, such as *.txt (matching files ending with .txt), or a specific file path. flags is an optional parameter used to control the function

PHP function introduction—rename(): Rename a file or directory PHP function introduction—rename(): Rename a file or directory Jul 25, 2023 pm 12:10 PM

PHP function introduction—rename(): Renaming files or directories Introduction: In PHP, the rename() function is used to rename files or directories. It provides an easy way to change the name of a file or directory. Whether it is a single file or an entire directory, you can use this function to perform a rename operation. The renaming process can be easily accomplished by specifying the name of the source file or directory and the target name. Syntax: boolrename(string$source,str

How to check if a directory is empty in Linux How to check if a directory is empty in Linux Mar 20, 2023 am 10:17 AM

How to check whether the directory is empty in Linux: 1. Enter the Linux terminal; 2. By executing "res=`ls -A $dir` if [ -z $res ]; then echo "$dir ..."else echo "$ The dir..."fi" method can determine whether the directory is empty.

How to automatically generate a directory. How to set the format of the automatically generated directory. How to automatically generate a directory. How to set the format of the automatically generated directory. Feb 22, 2024 pm 03:30 PM

Select the style of the catalog in Word, and it will be automatically generated after the operation is completed. Analysis 1. Go to Word on your computer and click to import. 2After entering, click on the file directory. 3 Then select the style of the directory. 4. After the operation is completed, you can see that the file directory is automatically generated. Supplement: The table of contents of the summary/notes article is automatically generated, including first-level headings, second-level headings and third-level headings, usually no more than third-level headings.

Use the path/filepath.Split function to split the path into directory and file name parts Use the path/filepath.Split function to split the path into directory and file name parts Jul 25, 2023 pm 05:57 PM

Use the path/filepath.Split function to split the path into two parts: directory and file name. When developing programs or processing files, it is often necessary to split the path into two parts: directory and file name. In Go language, you can use the Split function in the path/filepath package to achieve this function. This article will introduce the usage of the Split function and give code examples. The Split function is defined as follows: funcSplit(pathstring)(di

See all articles