LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 01-27-2010, 10:08 AM   #1
amirsd
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Rep: Reputation: 0
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.

Last edited by amirsd; 01-27-2010 at 10:10 AM.
 
Old 01-27-2010, 10:24 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
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.
 
Old 01-27-2010, 10:26 AM   #3
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,754

Rep: Reputation: Disabled
use gparted or qtparted or parted
 
Old 01-27-2010, 10:38 AM   #4
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 648

Rep: Reputation: 78
try df -h not sure if it shows unused partition space or not. I don't have any to try it on
 
Old 01-27-2010, 11:04 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
no it doesn't, it's for filesystems, not partitions, very different things.
 
Old 01-27-2010, 01:35 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 10,882
Blog Entries: 1

Rep: Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307
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.

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find how much free space left on my hard disk? DataSheet Linux - Newbie 5 01-06-2007 10:35 PM
Finding Used / Free Space for the Entire Hard Disk Jayaraghavendran Programming 1 03-03-2006 05:33 AM
fdisk doesn't recognize free space on 300GB Disk thesix Ubuntu 6 05-21-2005 10:30 PM
fdisk doesn't recognize free space on 300GB Disk thesix Linux - Hardware 2 05-14-2005 08:19 PM
Not enough free space on hard drive with 50g of free space??? auoq Suse/Novell 5 10-13-2004 08:21 PM


All times are GMT -5. The time now is 01:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration