How to know the size of a file, a directory, or a disk

https://askubuntu.com/questions/1224/how-do-i-determine-the-total-size-of-a-directory-folder-from-the-command-line

ls -l, which only displays the size of the individual files in a directory, nor
df -h, which only displays the free and used space on my disks.

The command du “summarizes disk usage of each FILE, recursively for directories,” e.g.,

du -hs /path/to/directory
-h is to get the numbers “human readable”, e.g. get 140M instead of 143260 (size in KBytes)
-s is for summary (otherwise you’ll get not only the size of the folder but also for everything in the folder separately)