Linux commands-File system common commands: DF,DU,FSCK,DUMPE2FS

Source: Internet
Author: User

Df-h user-friendly display file system partition information

Note: The directory in Linux is also a file, do not confuse the following directory file to say.

The traditional way to view the file size can be used: ll-h/directory/file name, you can see the size of the file, but if you want to see the size of a directory, using the command: ll-h/directory, can only view the current directory information size, rather than the current directory of all the contents of the total file size occupied. For example: Ll-h/data look at the size of all the files in the data directory, it shows the size of each file and directory inside the directory.

Du/data will count the size of this directory and each of its subdirectory files, and note that the last is how much disk space this data directory file occupies.

Du-h/data humanized Display the size of the data directory, but also the last line is the Data directory summary information

If you want to check the/data directory size, do not want to see the size of all the subdirectory files inside, you can use the-s option

Du-sh/data user-friendly display the size of the data directory, showing only the data directory size, not the size of each directory and file inside it

DF can also count the root partition "/" size, Du-sh/can also count the root partition "/" size, but note: the du command scans each file and counts the size, which is more expensive than using Linux system resources sparingly. However, the results of the two statistics are likely to be inconsistent, usually DF is larger than the results of DU statistics, because:

Linux commands-File system common commands: DF,DU,FSCK,DUMPE2FS

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.