Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Free disk space

Status
Not open for further replies.

StickyBit

Technical User
Jan 4, 2002
264
CA
Folks,

What command would I use to figure out available disk space on my Hard Drive? I would like to create some new partitions if possible.

Stickybit.

 
There are two things you can look at:

df will show you your existing partitions along with usage
fdisk, then l(ist) will show you partitions on a disk and free space
 
How to calculate the free space on this disk?

The /dev/sda is 18GB and I allocated 4GB during the inital installation. Where is the 14GB?

[root@tac-tor1web1 /]# fdisk -l /dev/sda

Disk /dev/sda: 255 heads, 63 sectors, 2213 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 392 3148708+ 83 Linux
/dev/sda2 393 653 2096482+ 82 Linux swap
/dev/sda3 654 787 1076355 83 Linux
 

> Disk /dev/sda: 255 heads, 63 sectors, 2213 cylinders

It has 2213 cylinders of (16065 * 512) = 8Mb.

> /dev/sda3 654 787 1076355 83 Linux

Last used cylinder is 787. This gives 1426 cylinders left.
1426 * 8Mb is 11.4Gb

Cheers Henrik Morsing
IBM Certified AIX 4.3 Systems Administration
 
Thanks for the help Henrik Morsing and others. What is the maximun amount of partitions I can create in Linux? Does Linux use a regular ufs file system? If so, I guess the answer would be 8 partitions.

Disk /dev/sda: 255 heads, 63 sectors, 2213 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 392 3148708+ 83 Linux
/dev/sda2 393 653 2096482+ 82 Linux swap
/dev/sda3 654 787 1076355 83 Linux
/dev/sda4 788 2213 11454345 83 Linux

I'm only able to create 1 - 4 partitions.

Thanks,

Stickybit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top