licoded / self-study-drafts

buffer for records
0 stars 0 forks source link

linux `ls` show folder total size #180

Open licoded opened 7 months ago

licoded commented 7 months ago

reference link: Using ls to list directories and their total sizes [closed]

Try something like:

du -sh *

short version of:

du --summarize --human-readable *

Explanation:

du: Disk Usage

-s: Display a summary for each specified file. (Equivalent to -d 0)

-h: "Human-readable" output. Use unit suffixes: Byte, Kibibyte (KiB), Mebibyte (MiB), Gibibyte (GiB), Tebibyte (TiB) and Pebibyte (PiB). (BASE2)