how to print the disks from lsblk in GIGA [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
-2
down vote
favorite
how to print the disks from lsblk in GIGA
lsblk -io KNAME,TYPE,SIZE,MODEL
dm-0 lvm 50G
dm-1 lvm 16G
dm-2 lvm 100G
sdb disk 1.8T AVAGO
sdc disk 1.8T AVAGO
sdd disk 1.8T AVAGO
sde disk 1.8T AVAGO
we need to print all disks in GIGA
we have the option -b to print in byte but we prefer in giga
linux filesystems rhel disk lsblk
closed as unclear what you're asking by Anthon, Jeff Schaller, sebasth, Stephen Rauch, Anthony Geoghegan Oct 2 '17 at 14:33
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
-2
down vote
favorite
how to print the disks from lsblk in GIGA
lsblk -io KNAME,TYPE,SIZE,MODEL
dm-0 lvm 50G
dm-1 lvm 16G
dm-2 lvm 100G
sdb disk 1.8T AVAGO
sdc disk 1.8T AVAGO
sdd disk 1.8T AVAGO
sde disk 1.8T AVAGO
we need to print all disks in GIGA
we have the option -b to print in byte but we prefer in giga
linux filesystems rhel disk lsblk
closed as unclear what you're asking by Anthon, Jeff Schaller, sebasth, Stephen Rauch, Anthony Geoghegan Oct 2 '17 at 14:33
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
2
What is GIGA? Do you mean gigabytes? Gigabit? Is that the same as giga?
â Anthon
Oct 2 '17 at 9:37
add a comment |Â
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
how to print the disks from lsblk in GIGA
lsblk -io KNAME,TYPE,SIZE,MODEL
dm-0 lvm 50G
dm-1 lvm 16G
dm-2 lvm 100G
sdb disk 1.8T AVAGO
sdc disk 1.8T AVAGO
sdd disk 1.8T AVAGO
sde disk 1.8T AVAGO
we need to print all disks in GIGA
we have the option -b to print in byte but we prefer in giga
linux filesystems rhel disk lsblk
how to print the disks from lsblk in GIGA
lsblk -io KNAME,TYPE,SIZE,MODEL
dm-0 lvm 50G
dm-1 lvm 16G
dm-2 lvm 100G
sdb disk 1.8T AVAGO
sdc disk 1.8T AVAGO
sdd disk 1.8T AVAGO
sde disk 1.8T AVAGO
we need to print all disks in GIGA
we have the option -b to print in byte but we prefer in giga
linux filesystems rhel disk lsblk
linux filesystems rhel disk lsblk
asked Oct 2 '17 at 7:34
jango
11528
11528
closed as unclear what you're asking by Anthon, Jeff Schaller, sebasth, Stephen Rauch, Anthony Geoghegan Oct 2 '17 at 14:33
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by Anthon, Jeff Schaller, sebasth, Stephen Rauch, Anthony Geoghegan Oct 2 '17 at 14:33
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
2
What is GIGA? Do you mean gigabytes? Gigabit? Is that the same as giga?
â Anthon
Oct 2 '17 at 9:37
add a comment |Â
2
What is GIGA? Do you mean gigabytes? Gigabit? Is that the same as giga?
â Anthon
Oct 2 '17 at 9:37
2
2
What is GIGA? Do you mean gigabytes? Gigabit? Is that the same as giga?
â Anthon
Oct 2 '17 at 9:37
What is GIGA? Do you mean gigabytes? Gigabit? Is that the same as giga?
â Anthon
Oct 2 '17 at 9:37
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Try this:
lsblk -b -io KNAME,TYPE,SIZE,MODEL | awk 'BEGINOFS="t" if (FNR>1) print $1,$2,$3/1073741824"G",$4; else print $0'
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Try this:
lsblk -b -io KNAME,TYPE,SIZE,MODEL | awk 'BEGINOFS="t" if (FNR>1) print $1,$2,$3/1073741824"G",$4; else print $0'
add a comment |Â
up vote
0
down vote
accepted
Try this:
lsblk -b -io KNAME,TYPE,SIZE,MODEL | awk 'BEGINOFS="t" if (FNR>1) print $1,$2,$3/1073741824"G",$4; else print $0'
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Try this:
lsblk -b -io KNAME,TYPE,SIZE,MODEL | awk 'BEGINOFS="t" if (FNR>1) print $1,$2,$3/1073741824"G",$4; else print $0'
Try this:
lsblk -b -io KNAME,TYPE,SIZE,MODEL | awk 'BEGINOFS="t" if (FNR>1) print $1,$2,$3/1073741824"G",$4; else print $0'
answered Oct 2 '17 at 9:09
Egor Vasilyev
1,792129
1,792129
add a comment |Â
add a comment |Â
2
What is GIGA? Do you mean gigabytes? Gigabit? Is that the same as giga?
â Anthon
Oct 2 '17 at 9:37