核心思想将文件转移到其它空间,再链接到原有目录
- 执行命令
cd /
- 执行命令
du -sh *
查找哪些目录下有大文件 - 找到后确认能删除就删除,如果不能删除就使用命令
ln -s
将大文件迁出系统空间 - 用iOS举例,最大的文件就是模拟器文件,目录
/Library/Developer/CoreSimulator/Profiles/Runtimes
,将此目录mv -r
到其它空间(如:/Volumn/dev/ios/Runtimes
),移动时间取决于文件大小 - 这时
/Library/Developer/CoreSimulator/Profiles
已经为空,使用命令ln -s /Volumn/dev/ios/Runtimes ./
生成一个链接文件 - 启动xcode模拟器,校验是否正常
android将SDK目录和AVD迁移出即可,步骤如上类似
The core idea is to transfer files to other spaces and then link to the original directory
- Execute the command
cd /
- Execute the command
du -sh *
to find out which directories have large files. - After you find it, you can delete it and delete it. If you can't delete it, use the command
ln -s
to move large files out of system space. - With iOS, the largest file is the emulator file, the directory
/Library/Developer/CoreSimulator/Profiles/Runtimes
, and the directorymv -r
to other spaces (eg:/Volumn/dev/ios/Runtimes
), the movement time depends on the file size - At this point
/Library/Developer/CoreSimulator/Profiles
is empty, use the commandln -s /Volumn/dev/ios/Runtimes ./
to generate a link file. - Start the xcode emulator and verify that it is normal.
android will move the SDK directory and AVD out, the steps are similar
translate by google