This article is a mirror article of machine translation, please click here to jump to the original article.

View: 22451|Reply: 0

[linux] Linux gets the total size of the disk

[Copy link]
Posted on 6/21/2021 11:38:43 AM | | | |
In Linux systems, "everything is a file", all files are placed in a tree directory structure with the root directory as the root of the tree. In Linux's view, any hardware device is also a file, and each of them has its own set of file systems (file directory structures).

The problem is that when using these hardware devices in a Linux system, the hardware device can only be used by combining the Linux itself's file directory with the hardware device's file directory. The process of merging into one is called "mounting".

Mounting refers to connecting the top-level directory in the device files to a directory (preferably an empty directory) in the Linux root directory, and accessing this directory is equivalent to accessing the device files.

The Linux df command is used to display the disk usage statistics of the file system currently on the Linux system.

Use the following command to clearly see the disk usage of each directory:

However, you cannot visually view the total size of all directories, you can view them with the following command:

You can also view all partition tables by using the following command:







Previous:Monitor the commands that Redis is executing
Next:Install the standalone version of elasticsearch 7.10.2 tutorial on Windows
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com