The command du is handy in determining how much space is used by a directory and its subdirectories. For example:
[alice@onyx C-examples]: du doublyLinkedLists 220 doublyLinkedLists/bad 100 doublyLinkedLists/library 172 doublyLinkedLists/generic 548 doublyLinkedLists [alice@onyx C-examples]:
By default, du reports sizes in units of Kilobytes (1024 bytes). You can ask for human readable units by using the -h option. For example:
[alice@onyx C-examples]: du -h doublyLinkedLists 220K doublyLinkedLists/bad 100K doublyLinkedLists/library 172K doublyLinkedLists/generic 548K doublyLinkedLists [alice@onyx C-examples]:
If you just want the sum total usage of the directory, use the -s option. For example:
[alice@onyx C-examples]: du -h -s doublyLinkedLists 548K doublyLinkedLists [alice@onyx C-examples]: