LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-24-2012, 01:22 AM   #1
deepak_message
Member
 
Registered: Oct 2007
Posts: 175

Rep: Reputation: 17
How to find out free disk space by running command


Hi ALL,

I am unable to find out the free disk space or usable disk space by command.

Actually, I am running fdisk -l, it shows total disk size parttion detials. it does not show how much disk free.
can any one please help for this.

# fdisk -l

Disk /dev/cciss/c0d0: 293.5 GB, 293564211200 bytes
255 heads, 32 sectors/track, 70265 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 25 101984 83 Linux
/dev/cciss/c0d0p2 26 2535 10240800 83 Linux
/dev/cciss/c0d0p3 2536 4543 8192640 82 Linux swap / Solaris
/dev/cciss/c0d0p4 4544 70265 268145760 5 Extended
/dev/cciss/c0d0p5 4544 5798 5120384 83 Linux
 
Old 09-24-2012, 01:25 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

have you tried using df?

Evo2.
 
Old 09-24-2012, 01:30 AM   #3
deepak_message
Member
 
Registered: Oct 2007
Posts: 175

Original Poster
Rep: Reputation: 17
yes, I tried df -h, but it does not show the actual free disk size.
however we have to calculate the usable disk and then subtract from total disk to usable disk.
but could be possible exact amount of free disk.
 
Old 09-24-2012, 01:37 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Then try
Quote:
du -chs *
 
Old 09-24-2012, 01:37 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

so the "Available" column in the output of df is not what you want?

Evo2.
 
Old 09-26-2012, 07:28 AM   #6
tgs78
LQ Newbie
 
Registered: Aug 2012
Posts: 6

Rep: Reputation: 0
du command usage with examples

You may also find the following article useful.

<moderated>

Last edited by colucix; 10-20-2012 at 08:40 AM. Reason: Removed advertising.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 12:57 PM
[SOLVED] Command to find free space? tokyoasha Linux - General 8 05-25-2012 07:19 AM
How to find how much free space left on my hard disk? DataSheet Linux - Newbie 5 01-06-2007 10:35 PM
Other than top command which cmd is used to find the cpu usage and disk space sathish80 Linux - Newbie 2 11-15-2006 12:43 AM
Free up disk space TheShemeta Slackware 5 11-26-2003 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration