LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 10-01-2005, 12:20 AM   #1
TigerLinux
Senior Member
 
Registered: Sep 2005
Location: Kuala Lumpur, Malaysia
Distribution: Ubuntu 11.04
Posts: 1,731

Rep: Reputation: 30
How to check free disk space


fdisk -l shows u your partitions' names
how about to know the free space available?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 10-01-2005, 12:26 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
df -h /path/to/dir

That requires you to know where your partitions are mounted. A look at /etc/fstab will set things straight if you have trouble remembering.
 
Old 10-01-2005, 02:03 AM   #3
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 33
df -h

With no options will give you free space of all mounted drives---no need to worry about fstab or remembering.
 
2 members found this post helpful.
Old 10-01-2005, 02:30 AM   #4
Ahmed
Member
 
Registered: May 2005
Location: München, Germany
Distribution: Slackware, Arch
Posts: 386

Rep: Reputation: 41
If you have QTParted (GUI partitioning software) it'll give you the details about every partition.

-A
 
Old 10-01-2005, 02:34 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally posted by Optimistic
df -h

With no options will give you free space of all mounted drives---no need to worry about fstab or remembering.
df on its own does the same thing without any flags.
 
Old 10-02-2005, 06:30 AM   #6
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 33
Quote:
Originally posted by reddazz
df on its own does the same thing without any flags.
Yep, but the h flag makes it easier to read. The h is for human-readable, after all.
 
1 members found this post helpful.
Old 10-02-2005, 09:23 AM   #7
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally posted by Optimistic
Yep, but the h flag makes it easier to read. The h is for human-readable, after all.
To clarify my point, on most Linux distros running "df -h" and "df" results in the same output (human-readable form usually in gigabytes), so its not necessary to use "df -h" unless you want to.
 
Old 10-02-2005, 09:07 PM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
To clarify my point, on most Linux distros running "df -h" and "df" results in the same output (human-readable form usually in gigabytes), so its not necessary to use "df -h" unless you want to.
Really? I've never seen that before in 4 years of using linux.
Are you sure you don't have a bash alias for df?
 
Old 10-03-2005, 02:34 AM   #9
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally posted by bulliver
Really? I've never seen that before in 4 years of using linux.
Are you sure you don't have a bash alias for df?
Nope, I have not setup any aliases but this could have been done by the distro.
 
Old 10-04-2005, 05:04 PM   #10
VRV
LQ Newbie
 
Registered: Sep 2005
Location: Richardson, Texas
Distribution: PCLinuxOS
Posts: 12

Rep: Reputation: 0
Thank you. df -h is suitable.
 
  


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
how to do a free space regular check baronlynx Linux - General 1 10-04-2005 07:01 PM
How do I check free partition space explorer Linux - General 5 04-14-2004 12:35 PM
Free up disk space TheShemeta Slackware 5 11-26-2003 04:50 PM
SCRIPT: check free space on partition base markus1982 Linux - Software 0 05-25-2003 05:52 AM
How to see free disk space bripage Linux - General 3 04-29-2002 08:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:44 AM.

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