Linux 系统基础 - 磁盘管理命令
版权声明:本文为 DLonng 原创文章,可以随意转载,但必须在明确位置注明出处!
In the usual work,disk management will not be used frequently,there commands we need to understand,need to use the time to go to a detailed understanding of usage.
df
Using df
to show current disk status :
df
du
Using du
to show current directory size :
# Show MB Or GB
du -sh
# Show Bytes
su -s
fdisk
Using fdisk
to create partition :
# Help : m,Partition : n,Exit : w
sudo fdisk /dev/sdb
mkfs
Using mkfs
to create file system :
# [-t] : Format type
sudo mkfs -t ext3 /dev/sdb1
mount / umount
Using mount
to mount device :
# 1. create mount dir in /mnt
mkdir /mnt/sdb
# 2. mount device to /mnt/sdb
sudo mount -t ext3 /dev/sdb1 /mnt/sdb
Using umount
to un mount device :
sudo umount /mnt/sdb
DLonng at 07/01/17