Show storage discard and rotational capabilities
Build a paste-ready command, then review its compatibility and effects before running it.
lsblk -D -o NAME,ROTA,DISC-GRAN,DISC-MAX,DISC-ZEROread-onlyno known side effects Compatibility
LinuxVerified for Linux using posix, bash, zsh syntax.
Operational knowledgereview due 2027-01-20
Requirementslsblklsblk must be installed and available on PATH.
Version supportlsblk Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsNAME ROTA DISC-GRAN DISC-MAX DISC-ZERORepresentative successful output; values vary with the selected target and system state.
Known errorslsblk: command not foundlsblk is missing or is not available on PATH.
Verifylsblk -D -o NAME,ROTA,DISC-GRAN,DISC-MAX,DISC-ZEROThe output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01lsblkCommandRuns the lsblk stage of this one-liner.
02-DOptionConfigures lsblk with the -D option.
03-oOptionSelects an output file or output format for this command.
04NAME,ROTA,DISC-GRAN,DISC-MAX,DISC-ZEROArgumentPasses NAME,ROTA,DISC-GRAN,DISC-MAX,DISC-ZERO to lsblk.
Example input
lsblk -D -o NAME,ROTA,DISC-GRAN,DISC-MAX,DISC-ZERO
Example output
NAME ROTA DISC-GRAN DISC-MAX DISC-ZERO
sda 0 4K 2G 0
Illustrative output — exact values vary by system and data.
Official sources