0

I am running MacOS 10.14.5. I used symbolic links a lot to free up my internal drive. My internal drive is almost full and I need to free up some spaces again. Normally, the symbolic links solution work very well even for many apps. But there is one app which can not recognize the symbolic link I created. So I am wondering how to workaround this issue? I have to move this app's library directory to external ssd drive, it uses 50% of my internal drive.

Btw, the path I plan to move is at ~/Library/Containers/xxxx.

Thanks a lot.

PS: I am wondering if I can create a .sparseimage file and then put it at external drive. And add it somehow to /etc/fstab to mount it at a specific location. Not sure if this will work. I am checking this way now.

1
  • Containers is normally just a whole bunch of sym links itself. It doesn't usually contain a lot of data, but some utilities can show it as containing loads, because they count the contents of all the sym links. It's also critical to the running of sandboxed apps. Unless you've got app-specific content like audio sample libraries, the largest part of any disk will be User files, rather than User Library content.
    – benwiggy
    Commented Feb 8, 2020 at 15:11

1 Answer 1

3

OK, finally I solved this problem. My solution:

  1. Use Disk Utility.app to create a new blank image with sparseimage type and save it at the external ssd drive.
  2. Then mount the sparse image at the target location, such as hdiutil attach /Volumes/<externalssd>/file.sparseimage -mountpoint ~/Library/Containers/<target_path>
  3. move all the original files to the mounted point.

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.

2
  • This helps me to run .utm vm files from external drives. Thanks
    – dotslash
    Commented Oct 29, 2021 at 14:15
  • @sgon00 it worked first time, but after rebooting I'm not able to mount it anymore. It says : $ hdiutil attach /Volumes/SSD/UTMExternal.dmg.sparseimage -mountpoint com.utmapp.UTM hdiutil: attach failed - Permission denied Any clue? Commented Nov 7 at 0:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .