About the Post

Author Information

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

 

Tags: , , ,

No comments yet.

Leave a Reply