Nix: Sorted human readable sizes
du -hsc * | sort -h
What each option means for du:
- -h (or –human-readable): show sizes in human readable format (1K, 1M, 1G, …)
- -s (or –summarize): display only a total for each argument
- -c (or –total): also display a grand total
The
-h(or--human-numeric-sort) option onsortmakes it understand the-hformat (human readable) ondu.
Via SuperUser.
Leave a comment