Parted has two modes: command line and interactive. Parted should always be started with:
# parted device
where device is the hard disk device to edit. (If you're lazy, Parted will attempt to guess which device you want.)
In command line mode, this is followed by one or more commands. For example:
# parted /dev/sda resize 1 52 104 mkfs 2 fat16
Options (like --help) can only be specified on the command line.
In interactive mode, commands are entered one at a time at a prompt, and modify the disk immediately. For example:
(parted) resize 1 52.0005 104.5 (parted) mkfs 2 fat16
Unambiguous abbreviations are allowed. For example, you can type "p" instead of "print", and "re" instead of "resize". Commands can be typed in, either in English, or your native language (if your language has been translated). This may create ambiguities.
Also note that you can specify decimal places in the numbers corresponding to partition locations (in megabytes). Negative numbers count from the end of the disk, with "-0" being the end of the disk.
If you don't give a parameter to a command, Parted will ask you for it. For example:
(parted) resize 1 Start? 0 End? 400
Parted will always warn you before doing something that is potentially dangerous, unless it's something that's obviosuly dangerous (i.e. rm, mklabel, mkfs) For example, if you attempt to shrink a partition "too much" (i.e. by more than the free space available), Parted will automatically resize to the minimum it can without losing data. If this minimum is significantly different, it will warn you that it's doing something significanlty different to what you asked. Since many partitioning systems have complicated constraints, Parted will usually do something slightly different to what you asked. (For example, create a partitiong starting at 10.352, not 10.4)
Go to the first, previous, next, last section, table of contents.