What is the difference between df and du commands in Linux?

Source: Internet
Author: User
What is the difference between df and du commands in Linux? 1. df shows the usage of the file system. compared with du, df is more comprehensive. Df-T is the most commonly used

What is the difference between df and du commands in Linux?

1. df shows the usage of the file system. compared with du, df is more comprehensive.

Df-T is commonly used to display the usage of the file system and the type of the file system.

Example:

[Root @ localhost ~] # Df-TFilesystem Type 1K-blocks Used Available Use % Mounted on/dev/mapper/VolGroup-lv_root ext4 18134344 780860 16432296 5%/tmpfs 506176 0 506176 0%/dev/shm/dev/sda1 ext4 495844 33447 436797 8%/boot
II. du: displays disk space occupied by files or directories

The most common method is to display the size of a directory in du-sh. for example, to display the disk space usage of a user's home directory:

[Root @ syy ~] # Du-sh/home/syy9.2G/home/syy
Related Article

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.