In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
The editor will share with you how to use the df command in Linux. I hope you will get something after reading this article. Let's discuss it together.
The Linux common command df is used to display the available disk space on a disk partition. The default display unit is KB. You can use this command to get information such as how much space the hard disk is occupied and how much space is left.
Df displays information about the disk
Syntax df (option) (parameter) option-an or-- all: contains all file systems;-- block-size=: displays the number of chunks in a specified chunk size;-h or-- human-readable: displays information in a more readable manner;-H or-- si: same as the-h parameter, but is calculated in 1000 Bytes conversion units instead of 1024 Bytes;-I or-- inodes: displays inode information -k or-- kilobytes: specify a chunk size of 1024 bytes;-l or-- local: display only the file system on the local side;-m or-- megabytes: specify a chunk size of 1048576 bytes;-- no-sync: do not execute the sync instruction, which is the default value before getting disk usage information;-P or-- portability: use the POSIX output format;-- sync: execute the sync instruction before getting disk usage information -t or-- type=: displays only disk information of the specified file system type;-T or-- print-type: displays the type of file system;-x or-- exclude-type=: does not display disk information of the specified file system type;-- help: displays help;-- version: displays version information. Parameter file: specifies the file on the file system.
The size format displays values in units of-- block-size and the first available SIZE in the DF_BLOCK_SIZE,BLOCK_SIZE and BLOCKSIZE environment variables. Otherwise, the unit defaults to 1024 bytes (512 if POSIXLY_CORRECT is set).
SIZE is an integer and an optional unit (for example: 10m is 10 * 1024 * 1024). The unit is K ·M ·G ·T ·P ·E ·Z ·Y (the power of 1024) or KB,MB, … (power of 1000).
Instance to view the system disk devices. The default is KB:
[root@LinServ-1 ~] # df File system 1K-Block used used mount point / dev/sda2 146294492 28244432 110498708 21% / / dev/sda1 1019208 62360 904240 7% / boot tmpfs 1032204 0 1032204 0% / dev/shm / dev/sdb1 2884284108 218826068 2518944764 8% / data1 is displayed in units above KB using the-h option High readability:
[root@LinServ-1 ~] # df-h File system capacity available available Mount Point / dev/sda2 140G 27G 106G 21% / / dev/sda1 996M 61M 884M 7% / boot tmpfs 1009M 01009M 0% / dev/shm / dev/sdb1 2.7T 209G 2.4T 8% / data1 View all file systems:
[root@LinServ-1 ~] # df-a File system 1K-Block used used% mount point / dev/sda2 146294492 28244432 110498708 21% / proc 0 110498708-/ proc sysfs 000-/ sys devpts 0 904240-/ dev/pts / dev/sda1 1019208 0 904240 / boot tmpfs 1032204 0 1032204 / dev/shm / dev/sdb1 2884284108 218826068 25189447664 62360 / data1 none 0 1032204- / proc/sys/fs/binfmt_misc displays the amount of free space in the public directory As shown in the following output:
Df public # Filesystem 1K-blocks Used Available Use% Mounted on # / dev/loop0 18761008 15246924 2554392 86 / d Avail has finished reading this article. I believe you have some understanding of "how to use the df command in Linux". If you want to know more about it, please follow the industry information channel. 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.