April 29th, 2002, 06:46 PM
-
command for directory size
Hi there,
Pls bear with me, I'm a non-UNIX person...
I'm using RH Linux 6.2 and need to know the total size of a directory, including all the subdirectories and their files beneath it.
The only command I've found is ls -l, but it doesn't give me the complete size of all subdirectories, just the size of the "directory" (i.e., they're all the same) itself and shows it in blue.
I've also seen du, but all of the commands in help just give me a huge list of each file with their sizes. I need a grand total size of everything in the directory.
Is there a command for this?
Thanks in advance!
Last edited by wisconsinative; April 29th, 2002 at 06:52 PM.
April 29th, 2002, 07:41 PM
-
assuming that the directory that you want to know the size of is called 'mydir' and you're in the directory which contains 'mydir'.
du -h mydir | grep mydir$
April 30th, 2002, 09:04 AM
-
exactly what I needed. Thank you!!!