基础-14、df+du+磁盘分区
2018-06-14 本文已影响11人
赵老铁
笔记内容:
4.1 df命令
4.2 du命令
4.3/4.4 磁盘分区
一、df
1.1#df –h(查看分区)
1000Byte=1KB
1000KB=1MB
1000MB=1GB
1000GB=1TB
tmpfs表示临时文件系统,重启自动消失

1.2#free(查看swap分区)

1.3#df –i(查看inode号)

二、du
2.1#du –sh /root(看/root文件大小)

三、磁盘分区
3.1、给虚拟机加1块10G大小的虚拟磁盘(中间无截图,选择默认选项即可)




3.2#fdisk –l(查看磁盘)
reboot(重启后新建磁盘生效)


3.3、 磁盘分区(新磁盘划分分区才能使用)
fdisk /dev/sdb(/dev/sdb新磁盘)
m 帮助
n 新建
p 列出
w 保存
d 删除
e逻辑分区
新建分区(最多4主分区,最多2T,)
p+e<=4(主分区+逻辑分区)
+2G/+2G/+1G/+1G
d
e








