LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-09-2006, 03:16 PM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,133

Rep: Reputation: 45
Check hard disk usage per directory


Hello to everyone_
My hard disk now is full
I want to clean it a little but i need some software support. Do u know any cool programme that can show me how much disk space each folder uses? Any simple console command that can help me view directories and the disk space they consume..
 
Old 10-09-2006, 03:20 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
http://www.cyberciti.biz/faq/how-do-...sd-filesystem/

http://www.dsl.org/cookbook/cookbook_10.html

du -h (the h option is for human readable -- i.e. K,M,G) will give you size of files/directories

Last edited by pljvaldez; 10-09-2006 at 03:21 PM.
 
Old 10-09-2006, 04:14 PM   #3
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
I always cd into the directory I want to do a listing on and do:

du -sh *

This will give you the output of all the files and directories of the present working directory instead of printing off every single file and subdirectory.

For example, I want to see the sizes of ever directory in my home directory:

tricky@fs1:~$ du -sh *
4.0K Mail
187M archives
533M backup
9.8M downloads
28K perl
20M public_html

Without the -s in -sh, it will print every single file and subdirectory beyond, which just looks messy to me.
 
Old 10-09-2006, 04:37 PM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 64
You asked for a cool program ? Well, try kdirstat. It can show what are the big files/folders in graphical mode ! very cool...
 
Old 10-09-2006, 04:55 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally Posted by marozsas
You asked for a cool program ? Well, try kdirstat. It can show what are the big files/folders in graphical mode ! very cool...
du is cool enough.. why download and install third party tools when bash has everything you need already..
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check disk space used in a directory cli_man Linux - General 5 03-13-2009 04:28 PM
How to control hard disk usage in Samba? depam Linux - Software 3 09-18-2006 01:49 AM
Inconsistent disk/directory usage using 'ls' essdeeay Linux - General 1 10-28-2005 08:36 AM
Total Hard Disk Usage kbeaver Linux - Newbie 4 09-03-2003 10:43 AM
Hard disk usage... plisken Linux - General 7 01-31-2003 04:17 AM


All times are GMT -5. The time now is 09:50 AM.

Main Menu
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