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
The following describes the 60 required Linux commands that must be mastered by new users. If you have mastered these commands, your technology will be greatly improved, we hope that the technology will be greatly improved after reading this article.
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
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
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
One, view disk space situation DFThe DF command is used to view hard disk space usage, as well as to see the type of hard disk partition or the usage of inode nodes.The common parameters of the DF command are as follows:-a
1.1 Package Unpack Command (TAR)Common packing commands: tar, usually with the following parameters:
-C: Set parameters command for compressed files (create)
-x: Extracting parameter commands for files
-Z: Do you have the gzip attribute at the same
I. Mounting storage mediaThe Linux file system incorporates all the disks into a single virtual directory, which needs to be placed in the virtual directory before the new storage media is used, which is called mount (mounting) 1.1 Mount CommandThe
DF View the total capacity of mounted disks, usage capacity, remaining capacity, etc., can not add any parameters, by default is displayed in K unitsDF Common parameters are –i-h-k–m, etc.-I display results using inodes-h display in the appropriate
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.