LinuxQuestions.org
Help answer threads with 0 replies.
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 08-06-2012, 03:21 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Rep: Reputation: 32
How to check the whole disk space?


Hi,

I can use df -h to check the used and available disk space. But it doesn't show the sum.
 
Old 08-06-2012, 04:15 AM   #2
etech3
Senior Member
 
Registered: Jul 2009
Location: Virginia
Distribution: Debian Stable Testing Sid Slackware CentOS
Posts: 1,055
Blog Entries: 2

Rep: Reputation: 45
Did you try:
Code:
du -h
 
Old 08-06-2012, 04:48 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by etech3 View Post
Did you try:
Code:
du -h
Yes. It seems it just print out the sum of each directory but not the whole of disk. Besides, it print out a very long list and it takes very long.
 
Old 08-06-2012, 05:01 AM   #4
etech3
Senior Member
 
Registered: Jul 2009
Location: Virginia
Distribution: Debian Stable Testing Sid Slackware CentOS
Posts: 1,055
Blog Entries: 2

Rep: Reputation: 45
[quote]Besides, it print out a very long list and it takes very long.[/quote

I think it's the last line.

Code:
du -h
The last line on my test machines shows 1.1G.

Of cource there is nothing on this machine except a base install of Wheezy with a couple of small problem packages.

just my
 
Old 08-06-2012, 05:09 AM   #5
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
The last line on the machine is 6.9 GB. But if I use df -h I got followings:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_root-lv_root
                      4.9G  2.8G  1.9G  61% /
/dev/mapper/vg_root-lv_var
                      3.0G  458M  2.4G  17% /var
/dev/mapper/vg_root-lv_home
                      496M   21M  450M   5% /home
/dev/mapper/vg_root-lv_opt
                       13G  3.8G  8.2G  32% /opt
/dev/mapper/vg_root-lv_tmp
                      496M   19M  452M   4% /tmp
/dev/sda1              99M   41M   54M  43% /boot
tmpfs                 1.5G     0  1.5G   0% /dev/shm
Do you know is it possible not to print out the long list?
 
Old 08-06-2012, 05:23 AM   #6
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
To see the total by system and drives you can do this.

Code:
joe@Tux-Box  in ~$ df -hTl --total
Filesystem                                             Type      Size  Used Avail Use% Mounted on
rootfs                                                 rootfs     10G  1.3G  8.3G  14% /
udev                                                   devtmpfs   10M     0   10M   0% /dev
tmpfs                                                  tmpfs     801M  1.6M  799M   1% /run
/dev/disk/by-uuid/4f3d205b-268b-4cea-8ebd-132a6f755561 ext4       10G  1.3G  8.3G  14% /
tmpfs                                                  tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                                                  tmpfs     1.6G   76K  1.6G   1% /tmp
tmpfs                                                  tmpfs     1.6G  900K  1.6G   1% /run/shm
/dev/sda1                                              ext4      331M   36M  278M  12% /boot
/dev/sda4                                              ext4       25G  7.1G   17G  30% /home
/dev/sda5                                              ext4       12G  5.6G  5.0G  53% /usr
/dev/sda7                                              ext4      7.7G  646M  6.6G   9% /var
/dev/sdb1                                              ext4      1.4T  793G  534G  60% /media/Archive-I
/dev/sde1                                              ext4      1.4T  244G  1.1T  19% /media/Archive-II
/dev/sdc1                                              ext4      931G  234G  651G  27% /media/E-Space
/dev/sdf1                                              ext4      1.4T  597G  730G  45% /media/N-Space
/dev/sdd1                                              ext4      298G  214G   70G  76% /media/K-9
total                                                  -         5.4T  2.1T  3.1T  41%


If you wab to see by a group of folders then


Code:
joe@Tux-Box  in ~$ du -sch /media/N-Space/Cinema/
543G	/media/N-Space/Cinema/
543G	total
Hope this helps.

Last edited by jv2112; 08-06-2012 at 05:25 AM.
 
2 members found this post helpful.
Old 08-06-2012, 05:23 AM   #7
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 635

Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by thomas2004ch View Post
Hi,

I can use df -h to check the used and available disk space. But it doesn't show the sum.
What sum? If you mean user+avail, isn't it in the Size column?
 
Old 08-06-2012, 06:41 AM   #8
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 32
You get the point. Many thanks!
 
  


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
[SOLVED] how to check disk space mario.almeida Linux - Server 8 09-26-2010 07:16 AM
how to check my disk free space sanjay2004 Linux - Server 8 04-24-2010 01:09 AM
disk space check myint45 Programming 6 01-24-2008 09:26 PM
How do you check disk space? verlaine Linux - Software 4 11-12-2006 02:57 PM
How do you check disk space? tim1348 Linux - Newbie 10 10-31-2006 10:39 AM


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