[Linux] file system and df, du command

Source: Internet
Author: User
Ext2 file system the regular file system in Linux is Ext2 (Linuxsecondextendedfilesystem), which consists of the following three parts: 1) superblock: records the overall information of this file system, including the total amount, usage, and remaining amount of inodeblock, and the official file system of Linux Ext2 (Linux second extended file system), which consists of the following three parts: 1) super block: records the overall information of the file system, including the total inode/block quantity, usage, remaining amount, and file system format and related information. 2) inode: records the attributes and permissions of a file (metadata). a file occupies one inode and records the block number of the file data. 3) block: because Ext2 is an indexed file system and does not need to be fragmented frequently, the Windows FAT file system is not an Indexed file system, so fragment is often required. The Ext3 file system most mainstream Linux systems currently use Ext2 file systems. Ext3 is an upgraded version of Ext2 and mainly adds log support (Journaling) to quickly repair file systems. Df, dudf: list the overall disk usage of the file system df [ahikHTm] [Directory or file name]
-A: list all file systems, including special ones such as/proc-k: In KB-m: In MB-h: display in easily readable formats such as GB, MB, and KB-H: replace M = K with M = k-T: Display file system type (such as ext3) -I: The inode quantity is displayed, rather than the disk capacity. The most common ones are df-h or df-hT.
Df reads the content in superblock, so the speed is very fast.
Du: Evaluate the disk usage of the file system (usually used to evaluate the space occupied by Directories)
Du [0 ahskm] file or directory name-a: list all files and directories-h: display in a readable format-s: only list the total amount, do not list sub-directories-k: Display in KB-m: Display in MB the most commonly used: du-sh
Du will directly go to the file system to find all the file data, so it takes some time to execute.

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.