List the partition table for /dev/sdb with fdisk.
Do not start an interactive edit session or write changes.
Which command is appropriate?
fdisk -l DEVICE lists disk and partition information and exits, allowing layout inspection without an edit session.
Detailed explanation
rpm -K openssh.rpmIncorrect. fdisk without -l starts an interactive session.
Incorrect. fdisk without -l starts an interactive session.
rpm -q opensshIncorrect. --wipe can erase signatures and is not a read-only inspection.
Incorrect. --wipe can erase signatures and is not a read-only inspection.
rpm -V opensshCorrect. fdisk -l /dev/sdb lists the partition table.
Correct. fdisk -l /dev/sdb lists the partition table.
rpm -ql opensshIncorrect. A delete operation changes the layout.
Incorrect. A delete operation changes the layout.
Try it yourself
An example you can run in a temporary verification environment.
rpm -V rpmExpected result
差異がなければ出力なし。差異があればS、M、5、U、G等のコードKey points
- -l means list
- The device limits scope
- No interactive editor is started
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.