problem in determine partition size from number of blocks shown in fdisk command
Hi
i have problem in converting blocks to understandable size like mg or gigabyte. i calculate my partition size by this formula : Code:
(NumBlocks*1000)/1000000 will yield Megabytes Code:
$ echo '(1024000*1000)/(1000000)' | bc |
Are you using these conversion factors?
Code:
2048 blocks = 1,048,576 bytes = 1MB |
Quote:
i think i confused. i have partition with 1024000 blocks . how should i change it to megabyte ? |
Well according to that conversion, blocks/2048=MB and blocks/2097152=GB
But that only gives you 500MB...? Also, block size isn't always universal, it can be defined OraFAQ Forum DB_BLOCK_SIZE |
Deleted.
|
Quote:
(EDIT: It's a carryover from the days when the file system block size was almost always 1024 bytes, which is seldom the case with today's huge disk drives.) |
thanks every body . problem solved .
I was thinking that block size have same size in every place . so if i want to calculate my ubuntu partitions size in megabyte which have 41992192 blocks i can use this formula only in a case that your blocks have size of 1024 byte (Number-Of-Blocks * 1024)/1000000 = 43000 megabyte 1 megabyte is 1000000 byte . simply do this in terminal : Code:
$ echo "(41992192*1024)/1000000"|bc |
All times are GMT -5. The time now is 07:10 AM. |