cfdisk 还是 fdisk?

dot*_*hen 11 linux command-line fdisk cfdisk

在阅读手册页时,fdisk我遇到了这段有趣的文字:

有几个 *fdisk 程序。每个人都有自己的问题和优势。按 cfdisk、fdisk、sfdisk 的顺序尝试它们。(确实,cfdi​​sk 是一个漂亮的程序,它对它接受的分区表有严格的要求,并生成高质量的分区表。如果可以,请使用它。fdisk 是一个有缺陷的程序,它会做一些模糊的事情——通常它会产生合理的分区表)结果。它的唯一优点是它对 BSD 磁盘标签和其他非 DOS 分区表有一定的支持。如果可以,请避免使用它。sfdisk 仅供黑客使用 -- 用户界面很糟糕,但它比 fdisk 更正确,并且比 fdisk 和 cfdisk 都更强大。而且,它可以非交互地使用。)

我注意到两个应用程序的选项格式不同:

 - melancholy():/$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00036f1b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    39063551    19530752   83  Linux
/dev/sda2        39063552   976771071   468853760   83  Linux

Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00085251

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    15624191     7811072   82  Linux swap / Solaris
/dev/sdc2   *    15624192    64452607    24414208   83  Linux
/dev/sdc3        64454654  1953523711   944534529    5  Extended
Partition 3 does not start on physical sector boundary.
/dev/sdc5        64454656  1953523711   944534528   83  Linux
 - melancholy():/$ sudo cfdisk -l
cfdisk: invalid option -- 'l'

Usage:
Print version:
        cfdisk -v
Print partition table:
        cfdisk -P {r|s|t} [options] device
Interactive use:
        cfdisk [options] device

Options:
-a: Use arrow instead of highlighting;
-z: Start with a zero partition table, instead of reading the pt from disk;
-c C -h H -s S: Override the kernel's idea of the number of cylinders,
                the number of heads and the number of sectors/track.

Copyright (C) 1994-2002 Kevin E. Martin & aeb
Run Code Online (Sandbox Code Playgroud)

切换到使用cfdisk而不是真正的优点fdisk,还是手册页注释不再有效的历史观察?由于fdisk列出磁盘信息(-l标志)工作正常,我应该cfdisk仅用于更改分区和分区表吗?每个应用程序的真正优势和劣势是什么?

psu*_*usi 9

cfdisk是一个图形应用程序,旨在对新手更加友好。如果您对 感到满意fdisk,那么请务必使用它。如果您喜欢更多的手持操作和更少的(高级)选项,请使用cfdisk. 另一个不错的选择是 GNU parted