[plug] partition sizes

Richard Yellin rhyellin at westnet.com.au
Sat Feb 23 12:20:31 WST 2008


I've forgotten how to do this:
I want to get the size in MB or GB of each partition and, if possible, the  
total size of my operating system (yes RH9) so that I can estimate the  
size of a flash drive to use to backup.
Backup everything  (\) once a month and increments daily for a week.
(I was thinking of a flash drive of 8GB costing $59-69 - my price "range"!)
I tried:
.# /sbin/fdisk -l /dev/hda

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        13    104391   83  Linux
/dev/hda2            14      4804  38483707+  83  Linux
/dev/hda3          4805      4865    489982+  82  Linux swap

and had trouble when using the "p" key which prints the partition table -  
it didn't
# /sbin/fdisk p /dev/hda

Usage: fdisk [-b SSZ] [-u] DISK     Change partition table
        fdisk -l [-b SSZ] [-u] DISK  List partition table(s)
        fdisk -s PARTITION           Give partition size(s) in blocks
        fdisk -v                     Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors

Can someone help with the correct commands?
Thanks
-- 
regards Richard



More information about the plug mailing list