2019独角兽企业重金招聘Python工程师标准>>>
df的使用
[root@Carlton scripts]# df -i #查看inode信息
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vda1 2621440 89215 2532225 4% /
tmpfs 127498 23 127475 1% /dev/shm
/dev/vdb1 25792 11 25781 1% /mnt
[root@Carlton scripts]# df -h #单位为M的显示各个区的大小
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 40G 2.8G 35G 8% /
tmpfs 499M 12M 487M 3% /dev/shm
/dev/vdb1 94M 1.6M 87M 2% /mnt
[root@Carlton scripts]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 41152832 2887012 36168720 8% /
tmpfs 509992 11388 498604 3% /dev/shm
/dev/vdb1 95425 1550 88736 2% /mnt
[root@Carlton scripts]# df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/vda1 40189 2820 35322 8% /
tmpfs 499 12 487 3% /dev/shm
/dev/vdb1 94 2 87 2% /mnt
如何快速找到一个分区占用的大文件
[root@Carlton /]# du -sm *
7 bin
53 boot
1 dev
1 download
33 etc
137 home
1 index.html
292 lib
27 lib64
1 lost+found
1 media
1 mnt
1 opt
另一种显示方法
[root@Carlton /]# du -sh * # s 是全部显示的意思, h 即单位
6.7M bin
53M boot
428K dev
4.0K download
33M etc
139M home
24K index.html
292M lib
27M lib64
16K lost+found
4.0K media
13K mnt
4.0K opt
如果想详细了解,man 帮助