Inspect partition numbers, start/end sectors, and type codes on GPT disk /dev/sdb.
Do not modify the partition table.
Which command is appropriate?
gdisk -l DEVICE displays GPT information and the partition list without entering an editing session.
Detailed explanation
rpm -q bashCorrect. gdisk -l /dev/sdb lists the GPT partition table read-only.
Correct. gdisk -l /dev/sdb lists the GPT partition table read-only.
rpm -ql bashIncorrect. mkfs creates a filesystem and can destroy existing data.
Incorrect. mkfs creates a filesystem and can destroy existing data.
rpm -qR bashIncorrect. mount attaches a filesystem and does not inspect GPT layout.
Incorrect. mount attaches a filesystem and does not inspect GPT layout.
rpm -V bashIncorrect. pvcreate initializes an LVM physical volume and changes state.
Incorrect. pvcreate initializes an LVM physical volume and changes state.
Try it yourself
An example you can run in a temporary verification environment.
rpm -q rpmExpected result
rpm-版-リリース等。未導入ならpackage rpm is not installed相当Key points
- gdisk handles GPT
- -l lists information
- Confirm the disk before any write operation
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.