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
fdisk /dev/sdbIncorrect. fdisk without -l starts an interactive session.
fdisk --wipe always /dev/sdbIncorrect. --wipe can erase signatures and is not a read-only inspection.
fdisk -l /dev/sdbCorrect. fdisk -l /dev/sdb lists the partition table.
fdisk --delete /dev/sdbIncorrect. A delete operation changes the layout.
Try it yourself
An example you can run in a temporary verification environment.
fdisk --help | sed -n '1,18p'Expected result
-lまたは--listがパーティションテーブル一覧である旨Key points
- -l means list
- The device limits scope
- No interactive editor is started
Notes
- Environment: util-linux fdisk 2.x / ヘルプ表示のみ
- Use read-only inspection or a disposable disk when learning storage commands.
- Partition and LVM writes can destroy data; verify the target before running them.
Foundation review
Place the operation
Listing a table and editing a table have different safety and side-effect profiles.
Check the side effect
Confirm the target device and avoid write commands during inspection.