0

I like doing lsblk -o type,name,label,partlabel,size,model,serial,wwn,uuid

for the serial option it reports only 8 characters.

I just had two samsung ssd's, one with serial S3TANY0K123456 and another with S3TANY0K654321 and lsblk reports just S3TANY0K

Is there a fix for this?

ron
  • 6,575

1 Answers1

3

When run in a terminal, outputting to the terminal, lsblk adjusts its output to the available width, truncating columns as necessary. This results in particular in shortened serial numbers.

To ensure you get the full output, you can redirect the output to another program:

lsblk -o type,name,label,partlabel,size,model,serial,wwn,uuid | cat

or better still if you want to post-process the information, use a machine-readable format — lsblk -J will output JSON:

lsblk -o type,name,label,partlabel,size,model,serial,wwn,uuid -J
Stephen Kitt
  • 434,908