Jump to content

directory size [solved]


satelliteuser083
 Share

Recommended Posts

Could someone tell me how to get a list of the directories (if that's the correct linux-term :unsure: ) on a partition, including the size of each (directory)? I'm pretty sure that it's a simple command, but I'm d.. ..d if I can find it . Thanks.

Edited by satelliteuser083
Link to comment
Share on other sites

I tend to do this:

 

du -sh `ls`

 

what it will do is parse the directory listing and give you the summary size for each one. Really handy, if you want to narrow down where all the space has gone. In my case, it's usually always my /home/ian/Downloads directory :)

 

ian@esprit ~ $ du -sh `ls` 
0	   Desktop
36M	 Documents
26G	 Downloads
0	   Music
103M	Pictures
0	   Videos
0	   bin
0	   vmware

Link to comment
Share on other sites

The key advantages in using Filelight is you do NOT have to use the cli to do what you are seeking and especially it gives you a valuable visual comparison of Directorys and folders in relation to oneanother in terms of size and placement. It is much more helpful in my opinion to newbies or not so newbies. I have tried the cli methods suggested and found it barely helpful.

 

Cheers. John.

Link to comment
Share on other sites

Incidentally I use Filelight for other stuff too, not just file sizes.

I put my website stats through it, to show where the most hits are (in the tree of directories of the website) where the angles represent number of hits instead of file size. And the other week we wanted to do some profiling of a program (measuring the time taken in each method call where methods were calling other methods in a tree) and used Filelight for visualizing that too - the angles then represented time taken inside each method. B)

Link to comment
Share on other sites

Even though I am more of a cli guy, I installed and ran filelight because of the recommendations in this thread and I am amazed at how easy it makes it for me to quickly clean up a bunch of garbage that was using a ton of space. Thanks, guys.

Edited by Steve Scrimpshire
Link to comment
Share on other sites

  • 2 weeks later...
I tend to do this:

 

du -sh `ls`

 

what it will do is parse the directory listing and give you the summary size for each one. Really handy, if you want to narrow down where all the space has gone. In my case, it's usually always my /home/ian/Downloads directory :)

 

ian@esprit ~ $ du -sh `ls` 
0	   Desktop
36M	 Documents
26G	 Downloads
0	   Music
103M	Pictures
0	   Videos
0	   bin
0	   vmware

 

The cli which you provided, i.e.

du -sh `ls`

, also lists all the files on the partition, whereas I only want a summary of the directories. Is there an option to do this; haven't been able to find it myself? :unsure:

Edited by satelliteuser083
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...