View all directory size distributions under Mac OS X

 1. First open the terminal and enter

du -sh *

This command is used to view the size distribution of all files in the root directory, as shown below:

There are two relatively large folders here, namely the Desktop and Library directories. Here we only look at Library.

2. Enter the command to enter the Library file path

Then, view all file size distributions under Library.

enter:

du -d 1 -h

Easily the largest file we can find: /Application Support/Caches/Developer

Of course, we can also see other file sizes, at a glance, and you can also view the directory size of the second layer of the path as needed, as shown below.


 

3. At this point, we can basically know the following routines, we can continue to look down

For example, I continue to enter the Developer file here, and then check the size of each of his sub-files:

Basically, if you look at two or three layers, you can know the approximate reason.

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325260733&siteId=291194637