Enquanto lia a man page de fdisk
, encontrei este texto interessante:
There are several *fdisk programs around. Each has its problems and strengths. Try them in the order
cfdisk, fdisk, sfdisk. (Indeed, cfdisk is a beautiful program that has strict requirements on the parti‐
tion tables it accepts, and produces high quality partition tables. Use it if you can. fdisk is a buggy
program that does fuzzy things - usually it happens to produce reasonable results. Its single advantage is
that it has some support for BSD disk labels and other non-DOS partition tables. Avoid it if you can.
sfdisk is for hackers only -- the user interface is terrible, but it is more correct than fdisk and more
powerful than both fdisk and cfdisk. Moreover, it can be used noninteractively.)
Noto que os formatos das opções não são os mesmos para os dois aplicativos:
- 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
Existe um mérito real em usar cfdisk
em vez de fdisk
, ou a página man observa uma observação histórica que não é mais válida? Como fdisk
funciona bem para listar informações dos discos ( -l
flag) devo usar cfdisk
apenas para alterar as partições e as tabelas de partições? Quais são os verdadeiros pontos strongs e fracos de cada aplicativo?