LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   directory size listing with ls (https://www.linuxquestions.org/questions/linux-general-1/directory-size-listing-with-ls-274184/)

mikemrh9 01-05-2005 10:59 AM

directory size listing with ls
 
Hi.

I'm trying to get 'ls' to show me the total size of a directory. ls -l just gives the directory entry size, but not the cumulative size of the files contained within it.

I can't see anything in the man page. Any ideas, please?

druuna 01-05-2005 11:16 AM

Hi,

To my knowledge this cannot be done with ls, take a look at du (du -s).

Hope this helps.

Blinker_Fluid 01-05-2005 12:04 PM

There is ls -dl but I don't think it shows you size.
I would use this instead in the directory:
du -h --max-depth=1


All times are GMT -5. The time now is 10:41 PM.