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.
|