LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Display Free Hard Disk Space using Fdisk (https://www.linuxquestions.org/questions/linux-newbie-8/display-free-hard-disk-space-using-fdisk-785084/)

amirsd 01-27-2010 10:08 AM

Display Free Hard Disk Space using Fdisk
 
I like to see the unmounted hard disk space free that can be used to create more partition using fdisk. Please see below "fdisk -l" shows the following table

Disk /dev/sda: 250.0 GB, 250000000000 bytes
64 heads, 32 sectors/track, 238418 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x49e2fd2f

Device Boot Start End Blocks Id System
/dev/sda1 5 900 917504 5 Extended
/dev/sda2 901 4995 4193280 6 FAT16
/dev/sda4 * 1 4 4080 4 FAT16 <32M
/dev/sda5 5 254 255984 6 FAT16
/dev/sda6 255 504 255984 6 FAT16
/dev/sda7 505 614 112624 fc VMware VMKCORE
/dev/sda8 615 900 292848 6 FAT16

If I use "fdisk /dev/sda". I can create a partition /dev/sda3 and more but I want to see the free space before creating the partition.

Using "fdisk -l" does not displays the free space that can be used like to create partition /dev/sda3, which is the free space on the partition around 244GB. I like to see that or how I can display that so I can create a partition on it. Any tip would be nice.

acid_kewpie 01-27-2010 10:24 AM

not sure why you want it. As I read the table you have space after cylinder 4995, where sda2 ends, so if you start it at 4996 and go on to fill the rest of the disk, which would be fdisk's default, that'll be your partition.

amani 01-27-2010 10:26 AM

use gparted or qtparted or parted

bret381 01-27-2010 10:38 AM

try df -h not sure if it shows unused partition space or not. I don't have any to try it on

acid_kewpie 01-27-2010 11:04 AM

no it doesn't, it's for filesystems, not partitions, very different things.

onebuck 01-27-2010 01:35 PM

Hi,

I'm not sure what the OP is trying to do but 'cfdisk /dev/OP_device' will show the partition information and any free unallocated space.

:hattip:


All times are GMT -5. The time now is 11:56 AM.