Tuesday, April 23, 2019

lsblk Linux Command | Detail of lsblk Linux Command | lsblk details



This post is divided into three parts.
  •  Default command and default output of lsbkl linux command 
  • Options for lsblk Linux command 
  • Available columns for output of lsblk Linux command


Default command and Default out put of lsblk linux command:
  •  [appsdba@reyaz Desktop]$ lsblk 

linux command lsblk
Default output of lsblk



Options for lsblk Linux command:



Options:
 -a,                          --all                        print all devices
 -b,                         --bytes                    print SIZE in bytes rather than in human readable format
 -d,                         --nodeps                 don't print slaves or holders
 -D,                         --discard                print discard capabilities
 -e,                         --exclude <list>      exclude devices by major number (default: RAM disks)
 -I,                           --include <list>     show only devices with specified major numbers
 -f,                          --fs                         output info about filesystems
 -h,                         --help                      usage information (this)
 -i,                           --ascii                    use ascii characters only
 -m,                        --perms                  output info about permissions
 -l,                           --list                      use list format output
 -n,                         --noheadings          don't print headings
 -o,                         --output <list>        output columns
 -p,                         --paths                    print complate device path
 -P,                         --pairs                     use key="value" output format
 -r,                          --raw                      use raw output format
 -s,                          --inverse               inverse dependencies
 -t,                          --topology             output info about topology
 -S,                          --scsi                    output info about SCSI devices

 -h,                         --help                    display this help and exit
 -V,                         --version               output version information and exit



Available columns for output of lsblk Linux command:

NAME   device name
KNAME  internal kernel device name
MAJ:MIN   major:minor device number
FSTYPE   filesystem type
MOUNTPOINT  where the device is mounted
LABEL  filesystem LABEL
UUID  filesystem UUID
PARTLABEL   partition LABEL
PARTUUID  partition UUID
RA   read-ahead of the device
RO  read-only device
RM   removable device
MODEL device identifier
SERIAL   disk serial number
SIZE   size of the device
STATE  state of the device
OWNER  user name
GROUP  group name
MODE  device node permissions
ALIGNMENT alignment offset
MIN-IO   minimum I/O size
OPT-IO optimal I/O size
PHY-SEC  physical sector size
LOG-SEC logical sector size
ROTA  rotational device
SCHED  I/O scheduler name
RQ-SIZE   request queue size
TYPE   device type
DISC-ALN  discard alignment offset
DISC-GRAN   discard granularity
DISC-MAX   discard max bytes
DISC-ZERO  discard zeroes data
WSAME   write same max bytes
WWN   unique storage identifier
RAND adds randomness
PKNAME  internal parent kernel device name
HCTL  Host:Channel:Target:Lun for SCSI
TRAN   device transport type
REV  device revision
VENDOR   device vendor




For more details use lsblk -help

 

You can find me on Fiverr & LinkedIn 




No comments:

Post a Comment