How do I get the size of a directory on the command line?
I tried to obtain the size of a directory (containing directories and subdirectories) by using the ls
command with option l
. It seems to work for files (ls -l file name
), but if I try to get the size of a directory (for instance, ls -l /home
), I get only 4096 bytes, although altogether it is much bigger.