LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2004, 03:23 PM   #1
GryphonTech
LQ Newbie
 
Registered: Sep 2003
Posts: 10

Rep: Reputation: 0
How does one calculate folder sizes in linux


What command(s) do I need to run in order to see calculated folder sizes in linux. My OSX box does this through the GUI. I have a linux server running that I am learning on and I'd like to beable to calculate the folder sizes.

I can run ls -lR and that shows me recursively the contents of a dir but I just need to know the calculated sizes.

Example.

MainDir
DirA
ContentA
ContentB

DirB
ContentAA
file1
file2
file3
ContentBB
file1
DirBB
file1
file2
ContentCC

DirC
ContentAAA

DirD
file1
file2


What I need to get is

MainDir
DirA 5Gig
DirB 500M
DirC 1Gig
DirD 200M


I'm planning on piping the output to a text file for later use. Any suggestions would be great.

Many thanks.
 
Old 10-23-2004, 03:32 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
In the directory that holds the other directories
du -sm *


Cheers,
Tink
 
Old 10-23-2004, 03:50 PM   #3
GryphonTech
LQ Newbie
 
Registered: Sep 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Many thanks.....

Niiiiice. So simple I am kicking myself for not figuring it out.

Thanks so much!

Rob
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate bandwidth on linux epsharma Linux - Software 4 07-02-2006 10:45 AM
Linux Partition Sizes ryN Linux - Software 9 11-12-2004 05:00 AM
Linux will not calculate my free space correctly on fat32 drive The_Last_Nerd Linux - Hardware 12 06-23-2004 03:42 PM
how to calculate shmmax when install Oracle in Linux exper Linux - Software 1 02-17-2004 05:15 AM
Calculate the space of a folder Half_Elf Linux - General 4 05-18-2003 07:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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