In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail about the use of linux's df command to display disk space usage. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The English full name of the df command is "Disk Free". As the name implies, the function is used to display the disk space available on the system. The default display unit is KB. It is recommended to use the parameter combination of "df-h" to automatically change the appropriate unit according to the disk capacity, which is easier to read.
This command is commonly used every day to check information such as how much space the disk is occupied and how much space is left.
Syntax format: df [parameters] [specified file]
Common parameters:
-a display all system files-B specifies the block size at display-h displays in an easy-to-read manner-H displays 1000 bytes as conversion unit-I displays index byte information-k specifies block size for 1KB-l displays only local file systems-t displays only specified types of file systems-T output displays file system types-sync executes the sync command before obtaining disk usage information
Reference example
Displays disk partition usage:
[root@linuxcool ~] # df
File system 1K-Block used available used% mount point
Devtmpfs 1980612 0 1980612 / dev
Tmpfs 1994756 0 1994756 / dev/shm
Tmpfs 1994756 1040 1993716 1% / run
Tmpfs 1994756 0 1994756 / sys/fs/cgroup
/ dev/mapper/fedora_linuxhell-root 15718400 2040836 13677564 13% /
Tmpfs 1994756 4 1994752 1% / tmp
/ dev/sda1 999320 128264 802244 14% / boot
Tmpfs 398948 0 398948 / run/user/0
Display disk partition usage in an easy-to-read way:
[root@linuxcool] # df-h
File system capacity used available used% mount point
Devtmpfs 1.9G 0 1.9G 0% / dev
Tmpfs 2.0G 0 2.0G 0% / dev/shm
Tmpfs 2.0G 1.1m 2.0G 1% / run
Tmpfs 2.0G 0 2.0G 0% / sys/fs/cgroup
/ dev/mapper/fedora_linuxhell-root 15G 2.0G 14G 13% /
Tmpfs 2.0G 4.0K 2.0G 1% / tmp
/ dev/sda1 976M 126M 784M 14% / boot
Tmpfs 390M 0390M 0% / run/user/0
Displays the disk usage of the partition in which the specified file is located:
[root@linuxcool ~] # df / etc/dhcp
File system 1K-Block used available used% mount point
/ dev/mapper/fedora_linuxcool-root 15718400 2040836 13677564 13% /
Displays disk usage with file type ext4:
[root@linuxcool] # df-t ext4
File system 1K-Block used available used% mount point
/ dev/sda1 999320 128264 802244 14% / boot on the use of linux's df command to display disk space usage, so much for sharing. I hope the above can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.
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.