LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 02:16 PM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

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, 02:20 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
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 02:21 PM.
 
Old 10-09-2006, 03:14 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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, 03:37 PM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
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, 03:55 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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



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 03:28 PM
How to control hard disk usage in Samba? depam Linux - Software 3 09-18-2006 12:49 AM
Inconsistent disk/directory usage using 'ls' essdeeay Linux - General 1 10-28-2005 07:36 AM
Total Hard Disk Usage kbeaver Linux - Newbie 4 09-03-2003 09:43 AM
Hard disk usage... plisken Linux - General 7 01-31-2003 03:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:11 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