For Programmers: Free Programming Magazines  


Home > Archive > Unix Shell Programming > October 2006 > size of all files combined









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author size of all files combined
Gary Wessle

2006-10-30, 7:14 pm

Hi

how can I obtain the total size of all files in current dir, including
all files in its directory tree as well. I mean every thing in this
directory including its sub(s).

I tried ls but that did not add them all up.

thanks
Todd H.

2006-10-30, 7:14 pm

Gary Wessle <phddas@yahoo.com> writes:

> Hi
>
> how can I obtain the total size of all files in current dir, including
> all files in its directory tree as well. I mean every thing in this
> directory including its sub(s).
>
> I tried ls but that did not add them all up.


du .
du -s .
man du



--
Todd H.
http://www.toddh.net/
Todd H.

2006-10-30, 7:14 pm

Gary Wessle <phddas@yahoo.com> writes:

> Hi
>
> how can I obtain the total size of all files in current dir, including
> all files in its directory tree as well. I mean every thing in this
> directory including its sub(s).


This is also handy


du -k . | sort -rn | less

--
Todd H.
http://www.toddh.net/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com