LinuxQuestions.org
Register a domain and help support LQ
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, 01: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?
 
Old 10-01-2005, 01:26 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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, 03:03 AM   #3
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 31
df -h

With no options will give you free space of all mounted drives---no need to worry about fstab or remembering.
 
1 members found this post helpful.
Old 10-01-2005, 03:30 AM   #4
Ahmed
Member
 
Registered: May 2005
Location: München, Germany
Distribution: Slackware
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, 03:34 AM   #5
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
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, 07:30 AM   #6
Optimistic
Member
 
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276

Rep: Reputation: 31
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.
 
Old 10-02-2005, 10:23 AM   #7
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
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, 10: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: 77
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, 03:34 AM   #9
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
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, 06: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


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to do a free space regular check baronlynx Linux - General 1 10-04-2005 08:01 PM
How do I check free partition space explorer Linux - General 5 04-14-2004 01:35 PM
Free up disk space TheShemeta Slackware 5 11-26-2003 05:50 PM
SCRIPT: check free space on partition base markus1982 Linux - Software 0 05-25-2003 06:52 AM
How to see free disk space bripage Linux - General 3 04-29-2002 09:38 PM


All times are GMT -5. The time now is 10:53 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration