How can I see the size of a file or directory?

linux-penguinThe commands in this article will show you how to discover the sizes of files and directories when using a Linux terminal.


Open a Terminal

Browse to the directory that contains the files and directories that you are interested in.

  • Use ls -s to list file size, or if you prefer ls -sh for human readable sizes.
  • For directories use du, and again, du -h for human readable sizes.

 

Thanks for visiting,
Steven