Inspect the disk label, capacity, partition boundaries, and filesystem information for /dev/sdb using parted.
Do not enter an editing operation.
Which command is appropriate?
parted DEVICE print displays the partition table. mklabel, mkpart, and rm modify the layout.
Detailed explanation
parted /dev/sdb mklabel gptIncorrect. mklabel creates a new label and can discard the existing layout.
Incorrect. mklabel creates a new label and can discard the existing layout.
parted /dev/sdb printCorrect. parted /dev/sdb print displays the disk and partitions.
Correct. parted /dev/sdb print displays the disk and partitions.
parted /dev/sdb rm 1Incorrect. rm deletes a partition.
Incorrect. rm deletes a partition.
parted /dev/sdb mkpart primary 1MiB 1GiBIncorrect. mkpart creates a partition.
Incorrect. mkpart creates a partition.
Try it yourself
An example you can run in a temporary verification environment.
parted --help | sed -n '1,24p'Expected result
print、mklabel、mkpart、rm等のコマンド説明Key points
- print is a query
- parted handles MBR and GPT
- Separate read-only and edit commands
Notes
- Environment: GNU Parted 3.x / ヘルプ表示のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.