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.
rpm -ql bashIncorrect. mkfs creates a filesystem and can destroy existing data.
rpm -qR bashIncorrect. mount attaches a filesystem and does not inspect GPT layout.
rpm -V bashIncorrect. 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 / 読み取り照会
- Use a read-only query or trusted disposable RPM when testing.
- RPM options and signature behavior should be confirmed on the target distribution.
Foundation review
Place the operation
The basic query reports package identity; file-list, dependency, and verification options answer different questions.
Check the side effect
Query a known installed package and observe the result for an absent package.