This time, we updated some common CentOS commands for disk operations. I hope it will be helpful for you to use CentOS. This article is very useful from the perspective of actual work. Here, we mainly use common CentOS commands for disks. Check CentOS common commands of disk space dfNO1. display usage of all storage system space, and display the file system type of the storage system s [root @ rehatroot] # df-aTNO
This time, we updated some common CentOS commands for disk operations. I hope it will be helpful for you to use CentOS. This article is very useful from the perspective of actual work. Here, we mainly use common CentOS commands for disks.
Common CentOS commands for checking disk space
Df
NO1. displays the space usage of all storage systems and the file system type s of the storage system.
[Root @ rehat root] # df-
NO2. display space usage of the specified file system
[Root @ rehat root] # df-t ext3
NO3. display the size of each storage space in a user-friendly manner
[Root @ rehat root] # df-ah
NO4. sometimes a network file system is mounted. if you only want to view the local file system, use the following command:
[Root @ rehat root] # df-ahlT
NO5. View disk usage of a file system
[Root @ rehat root] # df-h/dev/cdrom
Common CentOS commands used to check the directory space size
Du
NO1. view the current folder size
[Root @ rehat root] # du-sh
NO2. view the size of the subfolders in the current file and file
[Root @ rehat root] # du-ch
NO3. view the file size
[Root @ rehat root] # du-h test1.txt
NO4. view the size of multiple files at the same time
[Root @ rehat root] # du-h test1.txt test2.txt
Here, we have updated the common CentOS commands for disks.