Computer Science Mojo

~ David's Notes on coding, software and computer science




Post

How to show file size in Linux terminal

Category: Linux     Tag: Linux   Commands  
By: David     On: Sat 09 July 2016     

To list the file size of all the files in the current directory, use the du command

du -sh *
  • -s is for summarize so it gives a total size for a directory
  • -h is for human readable format with units
  • * is for all files. One can change it to a filename to see the size of only that file