View other usage of Mac disk space

As I was very curious one day, I opened my MacBook to check the disk space usage.
Then I found that the others took up 118G. Fuck, I was originally a 256G hard drive, so I got so much for it. I just want to know what else is.
I called customer service for a while, but I didn't understand it. Then I went to the after-sales service,
hey, the after-sales service told me to redo the system.
This is okay, helpless me, finally said okay, let's redo the system.
Not reconciled, I called the customer service again to ask about the situation. The customer service told me that I could check the usage status from the terminal, come on, go to Caiyi... my heart is beating, and my love is burning. Well, not much to say, as follows:

1 Open the terminal
. If you don’t know what the terminal is, go to Baidu, this is the basic. Forget it, let me tell you.
You enter Command+space and then enter Terminal, just press Enter.
2 Enter in the terminal
sudo du -shx /* | grep $'G\t' | sort -rn | head -n 10
At this time, you will be prompted to enter a password: enter your password.
insert image description here
Then, the picture below:
insert image description here
Don’t panic when this happens, don’t talk to him, just keep waiting.
After a while, the following picture appeared:
insert image description here
At this time, we can see that System occupies 92G, and Users occupy 44G

2. We then enter in the terminal

sudo du -shx /System/* | grep $'G\t' | sort -rn | head -n 10

see it? We find that the path with a large file is replaced:

sudo du -shx     / 【这里是文件路径(就像上面的System)】 /* | grep $'G\t' | sort -rn | head -n 10

In the [] above, you can just replace the path, and go down layer by layer to find the folder that you occupy a lot.

In summary, mine is because Mysql takes up a lot. I don't know what your reason is, just look for it.
Farewell.

Guess you like

Origin blog.csdn.net/myhAini/article/details/114982125