Du-ah--max-depth=1 This is what I want. A indicates that all files and folders (excluding subdirectories) are displayed in the directory, and H means that the max-depth represents the depth of the directory in a way that humans can read.
The du
The Linux du command also looks at the use of space, but unlike the DF command, the Linux du command is to see whether the currently specified file or directory (recursively displaying subdirectories) consumes disk space or is somewhat different
The du command is used to view the size of the disk space occupied by a directory or file. Common option combinations are: Du-shOne, Du's function: ' Du ' reports the amount of disk space used by the specified files and for each subdirectory (of
first, the purposeThis article describes the use of the Disk Management tool df and Du.The DF tool is used to view the disk usage of each partition in the system, and the Du tool is used to view the size of each directory in the file system. For
PS: Some time ago, children's shoes asked me, why his server with DF and du command query file size display is different. In fact, these two command query principle is not the same, the following is a brief analysis:1, under normal circumstances, DF
1. Preface
In embedded devices, hard disk space is very limited, when it comes to the process of often write log, you need to consider the size of the log and delete, or soon the hard disk is full, causing the log program crashes. In order to
A user logged on to the Linux system server to view the time, unexpectedly found that DF and du check out the results are not the same, du check out the "actual use of space" is significantly more than DF to check out the use of space is much
In Windows, you can easily view disk space, but you may be confused about how to view disk space in Linux. Don't worry. in Linux, you can use the following command to query logs.
UseDFCommand to view the disk attributes, including the file system
I previously wrote a system to monitor the remaining space on the disk script, today it sent me to the police, so I log on to the server to view, the results found that DF and du looked out of the results are different, du looked out of the "actual
1, under normal circumstances, DF and du output results will have a gap.The DU-SH command accumulates all the directories, symbolic links, and the number of blocks used by the file system using the specified file system.Total block number;The DF
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.