It is currently Mon, 25 Sep 2023 11:15:42 GMT



 
Author Message
 Folder size incl files in subfolders - any way to show it?
Is there a way to get a directory listing in which the size of a folder's
contents is shown (ie the sum of the files in the folder itself, and all the
files in its subfolders)?  'ls' can't do it, AFAIK.  It always shows the
size of a directory as '512', whether it contains no files or 50MB of files.
This makes it very difficult for me as sysadmin to see quickly how space on
our server is being used up.

BTW, Windows suffers from this same problem.  By choosing right clicking on
a folder in Windows Explorer, and choosing Properties, you can see the size
of all the files in the folder and its subfolders.  What would be really
nice is if it showed up right in Windows Explorer, so you could see at a
glance what folders where chewing up all the space.  I've found an excellent
third party app that does this: TreeSize Pro by Jam Software
< http://www.**-**.com/ ;

BTW2, the MacOS has had a "compute folder sizes" feature built-in for
*years*...

-Gerry



 Sun, 14 Sep 2003 17:34:20 GMT   
 Folder size incl files in subfolders - any way to show it?

The program du is what you want.  To see how much space is used in a
folder type

du -s folder

--
Stephen Montgomery-Smith
step...@math.missouri.edu
http://www.math.missouri.edu/~stephen



 Mon, 15 Sep 2003 00:03:20 GMT   
 Folder size incl files in subfolders - any way to show it?

news:3AC20B48.3C0E0E6E@math.missouri.edu...

Thanks for the tip!  I looked up the man page, and the combination of
options that does *exactly* what I want is:

du -s -c *

This shows the sizes (in KB) of the subdirectories of the current working
directory, and the grand total:

cygron% du -s -c *
1       ISS
123     aric
17      bshepherd
1       ctan
[etc..]
49      mkaur
23      rwolf
15      vyim
76852   total



 Mon, 15 Sep 2003 09:43:08 GMT   
 
   [ 3 post ] 

Similar Threads

1. reading all files in a folder and it's subfolders

2. backup complete folder with all subfolders

3. Any ways to show files named with spaces ?

4. Ways of reducing log files sizes automatically

5. Displaying file names and sizes in a folder

6. getting the total size of a kind of files in in a folder

7. Newbie question: listing folder and file sizes

8. chmod of all the files and sub folders under one folder

9. rm folders, sub-folders and files older than one hour

10. Command to show size of all files in a directory


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software