Article Title: simple operations on the file system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Now we know that the overall data of a disk is in the superblock block, but the size of each file is recorded in inode.
Df: list the total disk usage of the file system;
[Root @ www ~] # Df [-ahikHTm] [directory or file name]
Options and parameters:
-A: List all file systems, including the unique/proc file systems of the system;
-K: displays each file system based on the capacity of KBytes;
-M: displays the file systems with the capacity of MBytes;
-H: display data in easy-to-read formats such as GBytes, MBytes, and KBytes;
-H: Replace the carry mode of M = 1000 K with M = 1024 K;
-T: the filesystem name (for example, ext3) of the partition is also listed;
-I: displays the inode quantity instead of hard disk capacity.
Example 1: List all filesystems in the system!
[Root @ www ~] # Df
Filesystem 1K-blocks Used Available Use % Mounted on
/Dev/hdc2 9920624 3823112 5585444 41%/
/Dev/hdc3 4956316 141376 4559108 4%/home
/Dev/hdc1 101086 11126 84741 12%/boot
Tmpfs 371332 0 371332 0%/dev/shm
# In Linux, if df does not have any options, all
# (Excluding the archive system and swap in special memory) are listed as 1 Kbytes capacity!
# The/dev/shm is a memory-related mount. Ignore it first!
Example 2: display the capacity results in a readable capacity format
[Root @ www ~] # Df-h
Filesystem Size Used Avail Use % Mounted on
/Dev/hdc2 9.5G 3.7G 5.4G 41%/
/Dev/hdc3 4.8G 139 M 4.4G 4%/home
/Dev/hdc1 99 M 11 M 83 M 12%/boot
Tmpfs 363 M 0 363 M 0%/dev/shm
# Unlike Example 1, it will be displayed in the capacity format such as G/M, which is easy to see!
[1] [2] Next page