首页
首页 » 磁盘维护 » cfdisk

cfdisk

cfdisk
功能说明:磁盘分区。
语  法:cfdisk [-avz][-c <柱面数目>-h <磁头数目>-s <盘区数目>][-P <r,s,t>][外围设备代号]
补充说明:cfdisk是用来磁盘分区的程序,它十分类似DOS的fdisk,具有互动式操作界面而非传统fdisk的问答式界面,您可以轻易地利用方向键来操控分区操作。
参  数:
  -a   在程序里不用反白代表选取,而以箭头表示。
  -c<柱面数目>   忽略BIOS的数值,直接指定磁盘的柱面数目。
  -h<磁头数目>   忽略BIOS的数值,直接指定磁盘的磁头数目。
  -P<r,s,t>   显示分区表的内容,附加参数"r"会显示整个分区表的详细资料,附加参数"s"会依照磁区的顺序显示相关信息,附加参数"t"则会以磁头,磁区,柱面的方式来显示资料。
  -s<磁区数目>   忽略BIOS的数值,直接指定磁盘的磁区数目。
  -v   显示版本信息。
  -z   不读取现有的分区,直接当作没有分区的新磁盘使用。

cfdisk

cfdisk [options] [device]

System administration command. Partition a hard disk using a full-screen display. Normally, device will be /dev/hda, /dev/hdb, /dev/sda, /dev/sdb, /dev/hdc, /dev/hdd, and so on; the default is the first device on the system. See also fdisk.

Options

-a

Use an arrow on the left side to highlight the currently selected partition, instead of reverse video.

-c cylinders

Specify the number of cylinders to use to format the specified device.

-g

Ignore driver-provided geometry; guess one instead.

-h heads

Specify the number of heads to use to format the specified device.

-s sectors

Specify the number of sectors per track to use to format the specified device.

-v

Print version number and exit.

-z

Do not read the partition table; partition from scratch.

-P format

Display the partition table in format, which must be r (raw data), s (sector order), or t (table format). See the manpage for the meaning of the fields in the raw format, which shows what will be written by cfdisk for each partition. The sector format shows information about the sectors used by each partition. The table format shows the starting and ending head, sector, and cylinder for each partition.

Commands

up arrow, down arrow

Move among partitions.

left arrow, right arrow

Move among commands at the bottom of the screen.

Enter key

Select currently highlighted command or value.

b

Toggle flag indicating whether selected partition is bootable.

d

Delete partition (allow other partitions to use its space).

g

Alter the disk's geometry. Prompt for what to change: cylinders, heads, or sectors (c, h, or s, respectively).

h

Help.

m

Attempt to ensure maximum usage of disk space in the partition.

n

Create a new partition. Prompt for more information.

p

Print the partition table to a file. Possible formats are the same as for the -P option.

q

Quit without saving information.

t

Prompt for a new filesystem type, and change to that type.

u

Change the partition-size units. The choice of units rotates from megabytes to sectors to cylinders and back.

W

Save information. Must be uppercase, to prevent accidental writing.