Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2190  / 2 Years ago, tue, december 14, 2021, 2:28:05

Gparted and Disks utility give me different sizes for my hard drive and its partitions. Is there a reason, for both programs, to list different information or is it an error?



GParted & Terminal output: sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL




dev/sda = 298.1 Gib

/dev/sda3 = 191.40 GiB

/dev/sda4 = 92 GiB

/dev/sda5 = 88.40 GiB

/dev/sda6 = 3.60 GiB




Disks Utility output




dev/sdb = 320 Gib

/dev/sda3 = 206 GiB

/dev/sda4 = 99 GiB

/dev/sda5 = 95 GiB

/dev/sda6 = 3.9 GiB



More From » hard-drive

 Answers
5

The result shown by sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL performs calculations using the binary prefix i.e. multiples of 1024 (which is 210). So 500107862016 bytes would be equal to 465.76 GB or approximately 466 GB. (You can use -b switch to print in bytes instead of human readable as sudo lsblk -b -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL.)



Calculation:

500107862016 bytes = (500107862016 / (1024 ^ 3)) GB = 465.76 GB


While Disks Utility uses decimal prefix for calculation so expressed as multiples of 1000. So 500107862016 bytes here would mean 500.11 GB or 500 GB approx.



Calculation:

500107862016 bytes = (500107862016 / (1000 ^ 3)) GB = 500.11 GB

[#26737] Wednesday, December 15, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tionverflow

Total Points: 500
Total Questions: 115
Total Answers: 120

Location: Northern Ireland
Member since Mon, Nov 14, 2022
1 Year ago
;