Mac: See File Sizes in Terminal
Date: 2016-04-18 |
**Problem: **I’ve got a terminal opened in a directory on my computer. I want to see a list of all the files in the directory along with their corresponding file sizes, in human-readable form. How can I do this?
**Solution: **To see the file sizes of all the files in a given directory, simply type:
du -h *
- du will list the memory consumption of the directory
- -h tells it to print out human-readable sizes, as in kilobytes, megabytes, gigabytes, etc.
-
- Tells it you want to see all the individual items in the directory
Want more like this?
The best / easiest way to support my work is by subscribing for future updates and sharing with your network.