Linux system management and maintenance -df command

  
 

Function description: used to check the disk space occupation of the Linux system. Use format: df [options] option description: detailed description see the table below

option Meaning -h Output file system partition occupancy in an easy-to-understand format, such as 32k, 120M, 60G. -k Outputs the file system partition occupancy in units of K size. -m Outputs the file system partition occupancy in units of M size. -a Lists all file system partitions, including file system partitions of size 0. -i Lists the inodes information for the file system partition. -T Displays the file system type of the disk partition.

Example: 1. View the current system disk partition status, and display the file system type, user-friendly output, use the following command: [root@web1 ~]# df -hTFilesystem Type Size Used Avail Use% Mounted on/dev/sda2 ext3 15G 603M 14G 5% //dev/sda1 ext3 99M 14M 81M 14% /boot/dev/sda7 ext3 96G 19G 72G 21% /cicronone tmpfs 2.0G 0 2.0G 0% /dev/shm/dev/sda3 ext3 9.7G 3.3G 5.9G 36% /Usr/dev/sda6 ext3 7.7G 243M 7.1G 4% /var/dev/sdf6 ocfs2 951G 77G 875G 9% /webdata can be seen from the above output, the total size of each file system partition, the used size, the remaining size , the percentage of occupancy, etc., it can be seen that the above system uses three types of file systems: ext3, tmpfs, and ocfs2. The concept of the file system is described in detail in later chapters. 2. To output the inodes information of the file system, use the following command: [root@web1 ~]# df -ihTFilesystem Type Inodes IUsed IFree IUse% Mounted on/dev/sda2 ext3 1.9M 8.8K 1.9M 1% //dev/sda1 ext3 26K 38 26K 1% /boot/dev/sda7 ext3 13M 41K 13M 1% /cicronone tmpfs 496K 1 496K 1% /dev/shm/dev/sda3 ext3 1.3M 156K 1.1M 13% /usr/dev/sda6 ext3 1003K 3.3K 999K 1% /var/dev/sdf6 ocfs2 30M 2.4M 28M 9% /webdata

Copyright © Windows knowledge All Rights Reserved