In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to check disk and file size under linux". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to check disk and file size under linux.
When the disk size exceeds the standard, there will be an alarm, so it is wise to master the df and du commands.
Df can view the first-level folder size, usage ratio, file system and its mount point, but there is nothing you can do with files.
Df-T-h
The parameter-h indicates that the output of "Human-readable" is used, that is, easy-to-read formats such as GB, MB, etc. are used in the file system size.
The first field (Filesystem) and the last field (Mounted on) of the above command output are the file system and its mount point, respectively. We can see that the partition / dev/sda1 is hung in the root directory.
The next four fields Size, Used, Avail, and Use% are the capacity of the partition, the size used, the remaining size, and the percentage used, respectively. Under FreeBSD, when the hard disk capacity is full, you may see that the percentage used is more than 100%, because FreeBSD will leave some space for root, so that root can still write to the file system for management when the file system is full.
Du can view the size of files and folders.
Du: query disk usage space for files or folders
If there are many files and folders in the current directory, use the command without the parameter du to cycle through the space used by all files and folders. This is disadvantageous to see which place is too large, so you have to specify the number of layers in the deep directory, the parameter:-- max-depth=, this is a very useful parameter!
As follows, pay attention to the use of "*" to get the size of the file space.
Reminder: for FreeBSD, which has always been more complex than linux, its du command specifies the number of layers in the deep directory is simpler than linux, which is-d.
Du-h-max-depth=1 / home so far, I believe you have a deeper understanding of "how to check disk and file size under linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.