Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the command for linux system to check disk space

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to write the command of linux system to check disk space. I hope you will get something after reading this article. Let's discuss it together.

The command for the linux system to view disk space is [df-hl], which can view the amount of disk space left. To see the partition size of each root path, you can use the [df-h] command. The df command looks at the file system in disk partitions.

Linux can use the df and du commands to view disk space.

Df command

Df looks at the file system in terms of disk partitions and can get information such as how much space the hard disk is occupied and how much space is left.

For example, we use the df-h command to view disk information, and the-h option displays appropriately according to size:

Related commands:

Df-hl: view the remaining disk space

Df-h: view the partition size of each root path

Du command

The original meaning of du is disk usage, which means to show the use of disk space and is used to view the total size of the current directory.

For example, view the size of the current directory:

# du-sh605M.

Displays the space occupied by the specified file:

# du log2012.log 300 log2012.log

An easy-to-read format shows the space occupied by the test directory:

After reading this article, I believe you have a certain understanding of "how to write the command to check disk space in linux system". If you want to know more about it, you are welcome to 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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report