Linux-command learning-df, linux-command-df

Source: Internet
Author: User
Tags disk usage

Linux-command learning-df, linux-command-df

1. the df command is used to view the storage of the file system disk of the Linux server. You can use this command to obtain the disk space and the remaining space.

2. du: displays the disk space used by each file and directory.

 

3. Difference Between du and df

Du and disk usage calculate the size of each file by searching for the file and accumulate it. The files that du can see only exist and are not deleted. The calculated size is the sum of all the files that he considers to exist.

Df, disk free. You can use the File System to quickly obtain the space size information. When we delete a file, it does not disappear in the file system immediately, instead, it disappears temporarily. When no program is used, deleted files will be released according to OS rules. df records the size of the files obtained through the file system, he is better than du in that he can see the deleted files, and when calculating the size, add this part of space to make it more accurate.

After the file system determines that the file has been deleted, du and df will be consistent.

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.