How to list directory size?

Jonathan Hirschman jonathan at hirschman.net
Sat Jun 28 20:14:57 UTC 2008


Robert Dailey wrote:
> Hi,
> 
> I'm currently using Ubuntu Server 8. Is there a way to use the 'ls' 
> command to display the size of a directory? That is, the size should be 
> the added size of the contents of files and other subdirectories 
> (recursive).
> 

Try this:

du -sh dir_name

replace dir_name with the name of your directory :) You may want to look 
at other options in the manpage.

jh






More information about the ubuntu-users mailing list