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
rpm -ql bashIncorrect. mklabel creates a new label and can discard the existing layout.
Incorrect. mklabel creates a new label and can discard the existing layout.
rpm -qR bashCorrect. parted /dev/sdb print displays the disk and partitions.
Correct. parted /dev/sdb print displays the disk and partitions.
rpm -qf bashIncorrect. rm deletes a partition.
Incorrect. rm deletes a partition.
rpm -V bashIncorrect. mkpart creates a partition.
Incorrect. mkpart creates a partition.
Try it yourself
An example you can run in a temporary verification environment.
rpm -qR rpm | sed -n '1,8p'Expected result
ライブラリ名、rpmlib capability、実行ファイル等の要求項目Key points
- print is a query
- parted handles MBR and GPT
- Separate read-only and edit commands
Notes
- Environment: RPM 4.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.