[NTLUG:Discuss] Probably dumb question about total size of directory

Kenneth Loafman ken at lt.com
Sun Jun 1 09:27:54 CDT 2003


Greg Edwards wrote:
> severian at pobox.com wrote:
> 
>> Howdy,
>>   I just finished mirroring the ftp install directory of SuSE 8.2 
>> today.  I wanted to find how much I had downloaded.  The closest I 
>> could find was   ls -R -s
>> This will tell me the total disk space used in each directory and then 
>> I'd have to manually add up all the totals.  Is there some quick way 
>> to get what I used to do in DOS by typing   dir /s
>> Thanks,
>> Ralph
> 
> 
> 
> cd somedir
> du -h --max-depth=0 .
> 
> gives a summary of the current directory
> 


The shorter the better:

   du -hs

gives a summary of the current directory

   du -hs *

gives a single level summary of each subdir

...Ken




More information about the Discuss mailing list