检查磁盘空间的CentOS常用命令

来源:互联网 发布:英文写作润色软件 编辑:程序博客网 时间:2024/05/17 22:39

检查磁盘空间的CentOS常用命令

df
NO1. 显示所有存储系统空间使用情况,同时显示存储系统的文件系统类型s
[root@rehat root]# df -aT
NO2. 显示指定文件系统的空间使用情况
[root@rehat root]# df -t ext3
NO3. 人性化显示各存储空间大小
[root@rehat root]# df -ah
NO4. 有时候挂载了网络文件系统,若只想看本机的文件系统用如下命令
[root@rehat root]# df -ahlT
NO5. 查看某个文件系统的磁盘使用情况
[root@rehat root]# df -h /dev/cdrom

检查目录空间大小的CentOS常用命令

du
NO1. 查看当前文件夹大小
[root@rehat root]# du -sh
NO2. 查看当前文件及文件中包含的子文件夹大小
[root@rehat root]# du -ch
NO3. 查看文件的大小
[root@rehat root]# du -h test1.txt
NO4. 同时查看多个文件的大小
[root@rehat root]# du -h test1.txt test2.txt

0 0