Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 29th, 2002, 06:46 PM
wisconsinative's Avatar
wisconsinative wisconsinative is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Somewhere in the desert of Arizona
Posts: 63 wisconsinative User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 54 m
Reputation Power: 7
command for directory size

Hi there,

Pls bear with me, I'm a non-UNIX person...

I'm using RH Linux 6.2 and need to know the total size of a directory, including all the subdirectories and their files beneath it.

The only command I've found is ls -l, but it doesn't give me the complete size of all subdirectories, just the size of the "directory" (i.e., they're all the same) itself and shows it in blue.

I've also seen du, but all of the commands in help just give me a huge list of each file with their sizes. I need a grand total size of everything in the directory.

Is there a command for this?

Thanks in advance!

Last edited by wisconsinative : April 29th, 2002 at 06:52 PM.

Reply With Quote
  #2  
Old April 29th, 2002, 07:41 PM
justice41 justice41 is offline
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Emerald City
Posts: 289 justice41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
assuming that the directory that you want to know the size of is called 'mydir' and you're in the directory which contains 'mydir'.

du -h mydir | grep mydir$

Reply With Quote
  #3  
Old April 30th, 2002, 09:04 AM
wisconsinative's Avatar
wisconsinative wisconsinative is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Somewhere in the desert of Arizona
Posts: 63 wisconsinative User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 54 m
Reputation Power: 7
exactly what I needed. Thank you!!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > command for directory size


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway