Forrest logo
back to the lsblk tool

lsblk:tldr:28b34

lsblk: Exclude the devices specified by the comma-separated list of major device numbers.
$ lsblk -e ${1,7}
try on your machine

The command lsblk -e ${1,7} is used to list block devices, excluding specified classes of devices from the output.

Here's a breakdown of each part of the command:

  • lsblk is a command-line utility used to list information about block devices (such as hard drives, SSDs, USB drives) attached to a system.

  • -e is the option used to exclude specific classes of devices from the output. In this case, it is followed by ${1,7}.

  • ${1,7} is a Bash parameter expansion format that expands numbers from 1 to 7. It specifies the classes of devices to exclude from the output.

When the command is executed, lsblk lists block devices attached to the system, and any devices falling under the specified classes (1 to 7) are excluded from the output.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lsblk tool