The management of Linux Disk Management is directly related to the performance of the whole system.
Linux Disk Management commonly uses three commands for DF, Du, and Fdisk.
- DF: List The overall disk usage of the file system
- Du: Check Disk space usage
- FDISK: For disk partitioning
Df
DF Command parameter function: Check the disk space consumption of the file system. You can use this command to get information about how much space the hard disk is taking up, and how much space is left.
Grammar:
DF [-ahikhtm] [directory or file name]
Options and Parameters:
- -A: Lists all file systems, including system-specific/proc, etc.
- -K: Displays the file system in Kbytes capacity;
- -M: Display the file system in MBytes capacity;
- -H: GBytes, MBytes, Kbytes and other formats are displayed by people who are easier to read;
- -H: Replace m=1024k with m=1000k;
- -T: Displays the file system type, along with the filesystem name of the partition (for example, ext3);
- -I: Do not use the hard disk capacity, but the number of inode to display
Example 1
List all the file systems in the system!
[[Email protected] ~]# Dffilesystem 1K-blocks used Available use%mounted on/dev/hdc29920624 3823112 5585444 A%//DEV/HDC34956316 141376 4559108 4% /Home/dev/hdc1101086 11126 84741 A% /Boottmpfs371332 0 371332 0%/DEV/SHM
Under Linux If DF does not have any options, the default is to list all of the system's (non-special in-memory file systems and Swaps) in 1 Kbytes capacity!
Example 2
Display capacity results in an easy-to-read capacity format
[[email protected] ~]# DF-hfilesystem Size used Availuse% mountedon/DEV/HDC2 9 . 5G 3. 7G 5. 4G //dev/hdc3 4. 8G 139M 4. 4G 4%/home/dev/hdc1 99M 11M 83M /Boottmpfs 363M 0 363M 0/dev/shm
Example 3
List all special file formats and names in the system
[Email protected] ~]# DF-Atfilesystem Type 1K-blocks used Available use%mounted on/DEV/HDC2 ext39920624 3823112 5585444 A% /proc Proc0 0 0- /Procsysfs Sysfs0 0 0- /sysdevpts devpts0 0 0-/dev/pts/DEV/HDC3 ext34956316 141376 4559108 4% /Home/DEV/HDC1 ext3101086 11126 84741 A% /Boottmpfs Tmpfs371332 0 371332 0%/dev/Shmnone Binfmt_misc0 0 0-/proc/sys/fs/Binfmt_miscsunrpc rpc_pipefs0 0 0- /var/lib/nfs/rpc_pipefs
Example 4
Displays the available disk capacity under/etc in an easy-to-read capacity format
[Email protected] ~]# df-h/etcfilesystem Size used Availuse% mountedon/DEV/HDC2 9. 5G 3. 7G 5. 4G
Linux Disk Management