How to List Files & Directories With Size in Linux Command Line

The command du stands for Disk Uses. You can use this command to see how much disk space a file or directory is taking.

In order to list size of all files and directory of the current directory. You can run:

du -sh *

Explanation:

  • du: Disk Usage
  • -s: Display a summary for each specified file. (Equivalent to -d 0)
  • -h: “Human-readable” output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte.

 

Credit: molf
Special thanks to: Stackoverflow.com

 


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *