Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get size of directory structure

Status
Not open for further replies.

rondebbs

MIS
Joined
Dec 28, 2005
Messages
109
Location
US
Hello, new user here. If I have a directory structure made up a directory and 6 subdirectories - is there a simple command that will give me the size of the entire directory structure?

Thanks
 
I like using:

Code:
ls -lR /filesystem | awk '{sum += $5}; END {print sum}'
 
du -m /yourdir

Mike

Unix *is* user friendly. It's just selective about who its friends are.
 
I usually use:

du -sg /yourdir

Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top