In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
In this issue, the editor will bring you the introduction and use of the df command in linux, and analyze and describe it from a professional point of view. I hope you can get something after reading this article.
The function of the df command in linux is to check the disk space usage of the file system of the linux server. You can use this command to get information such as how much space the hard disk is occupied and how much space is left.
Command format:
Df [options] [File]
Command function:
Displays the free space for the specified disk file. If no file name is specified, the free space of all currently mounted file systems will be displayed. By default, disk space is displayed in 1KB unless the environment variable POSIXLY_CORRECT is specified.
Command parameters:
Required parameters:
-a list of all file systems-h easy reading mode shows-H equals "- h", but calculation formula, 1K=1000, not 1K=1024-i displays inode information-k block is 1024 bytes-l only shows local file system-m block is 1048576 bytes-no-sync ignores sync command-P output format is POSIX--sync execute sync command-T file system type before getting disk information
Select parameters:
-- block-size= specified chunk size-t displays only disk information for selected file systems-x does not display disk information for selected file systems-- help display help information-- version display version information
Examples of use:
Show disk usage
Command:
Df
Output:
[root@CT1190 log] # df File system 1K-Block used used% mount point / dev/sda7 19840892 890896 17925856 5% / / dev/sda9 203727156 112797500 8041391259% / opt/dev/sda8 4956284 570080 4130372 13% / var/dev/sda6 19840892 1977568 16839184 11% / usr/dev/sda3 988116 23880 913232 / boottmpfs 16473212 0 16473212 / dev/shm
Description:
The first column of the output list of the df command in linux is the pathname of the device file corresponding to the file system (usually the partition on the hard disk); the second column shows the number of data blocks (1024 bytes) contained in the partition; and the third and fourth columns represent the number of used and available data blocks, respectively.
Users may find it strange that the sum of the number of blocks in column 3 and 4 is not equal to the number of blocks in column 2. This is because each partition by default leaves a small amount of space for the system administrator to use.
Even if the normal user space is full, the administrator can still log in and leave the workspace needed to solve the problem.
The Use% column in the list represents the percentage of normal user space used, and even if this number reaches 100%, the partition still has space for the system administrator. Finally, the Mounted on column represents the mount point of the file system.
The above is the introduction and use of the df command in linux. Have you learned anything after reading it? If you want to know more about it, you are welcome to follow the industry information. Thank you for reading.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.