赞
踩
主要分为三大方案,1. 最方便可靠的方案更换硬盘芯片,价格 1000元/T;2. 外接移动硬盘;3. Nas。
本篇文章主要描述方案二,外接移动硬盘
我的设备是Mac Mini,没有移动、携带的需求,所以考虑这种性价比最高的方案。
对系统性能有一定的损失,外接硬盘的读写量会比较大,可能要考虑散热问题
Mac将应用程序及其数据移到外接硬盘的步骤
首先要明确 Mac上的应用程序分dmg安装包和ipa安装包,ipa在安装时可以选择安装路径,而dmg安装包只能装到Applications文件夹。所以以下步骤适用于dmg安装。
应用程序除了本体以外,还有数据文件。有的应用程序本体比较大,如Matlab,有的数据文件比较大,如Wechat。可以选择性的移动本体还是数据文件。
移动应用程序本体。
在“应用程序”文件夹将应用程序图标拖到外接硬盘中即可。
建议在这一步之后从外接硬盘打开一下应用程序,看是否能正常启动,有的应用程序要求必须安装在系统的应用程序文件夹中,此时启动会提示,如果要求必须安装在系统应用程序文件夹,则跳过这一步。如果提示已损坏,看下文注意事项。
移动数据文件。
数据文件一般需要在应用程序中右键点在访达中查看,然后右键显示简介,即可看到位置信息。 (数据文件一般存在于/User/username/Library或其下的Container文件夹中。如果找不到可以去里面找)
该方案针对Container的文件夹不一定有效,软链接以后会出现无法正常读写的问题。参考下面操作方式[[#将Containers 挂在到移动硬盘]]
首先将需要移动的文件/文件夹移动到外接硬盘(复制粘贴,然后删除源文件);
然后在终端(terminal)输入以下命令
ln -s 现在的数据文件 原来的路径
Mac系统上有软链接、硬链接、替身的概念,此处就不加赘述。
我关注到替身和软链接的区别:
替身是Mac的概念,且是finder中的概念,在其他系统无法识别;软链接是Linux的概念,通用性高。
替身文件在某些软件中无法正常识别;软链接都可以。具体看软件的文件读取协议。
软链接在创建时会在finder中显示为一个替身。
经测试有效
OK, finally I solved this problem. My solution:
Use Disk Utility.app to create a new blank image with sparseimage type and save it at the external ssd drive.
使用磁盘管理工具,在移动硬盘中新建一个分区
Then mount the sparse image at the target location, such as hdiutil attach /Volumes//file.sparseimage -mountpoint ~/Library/Containers/<target_path>
将分区挂载到~/Library/Containers/ 目录下的 软件名目录,如 com.tencent.wechat
move all the original files to the mounted point.
将原来的文件移动到刚才挂在的目录
在fstab中写入刚才的挂载路径,这样每次开机以后都会自动挂载
That’s all. By the way, you need to quit the app first and rename the target directory to something else before mounting the image obviously.
One more tip: you should make sure the target directory you want to move will not have any broken symbolic links after this workaround by running find . -type l -ls command.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。