linux fdisk查看命令,fdisk

例a,查看所有分区[root@localhost ~]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes

255 heads, 63 sectors/track, 60801 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 17 136552 83 Linux

/dev/sda2 18 279 2104515 82 Linux swap / Solaris

/dev/sda3 280 60801 486142965 5 Extended

/dev/sda5 280 60801 486142964+ 83 Linux

例b,fdisk分区[root@localhost ~]# fdisk /dev/hdc #分区时,不要加上数字

The number of cylinders for this disk is set to 5005.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): m #可以查看帮助

Command action

a toggle a bootable flag

b edit bsd disklabel

c toggle the dos compatibility flag

d delete a partition #删除分区

l list known partition types #列举已知分区

m print this menu

n add a new partition #增加分区

o create a new empty DOS partition table

p print the partition table #显示分区表

q quit without saving changes #不保存退出分区

s create a new empty Sun disklabel

t change a partition's system id #改变分区ID

u change display/entry units

v verify the partition table

w write table to disk and exit #保存分区操作

x extra functionality (experts only)

Command (m for help): p

Disk /dev/hdc: 41.1 GB, 41174138880 bytes #磁盘名称和大小

255 heads, 63 sectors/track, 5005 cylinders #磁头、磁区与磁柱数量,多少

Units = cylinders of 16065 * 512 = 8225280 bytes #每个磁柱的大小

Device Boot Start End Blocks Id System

/dev/hdc1 * 1 13 104391 83 Linux

/dev/hdc2 14 1288 10241437+ 83 Linux

/dev/hdc3 1289 1925 5116702+ 83 Linux

/dev/hdc4 1926 5005 24740100 5 Extended

/dev/hdc5 1926 2052 1020096 82 Linux swap / Solaris

Command (m for help): q # q是不保存退出,w不要随便输入

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值