0

I have recently begun to work with Apple laptops and macOS. I wrote a script that symlinks my files and configs, and it works for my linux laptop.

However, something went wrong in macOS.

I narrowed down the problem and could reproduce it like so:

  1. Create a directory on my Desktop.
$ mkdir ~/Desktop/folder
  1. Symlink it using relative path.
$ cd ~/Desktop
$ ln -sf ./folder linked_folder
  1. It works pretty well.

  2. Symlink it using absolute path.

$ cd /Users/myname/Desktop/a linked_folder_2
$ cd ~/Desktop/a linked_folder_3

Then something is not as I expect: the second and the third one I created are identified as an Apple alias, which does not act like a linked folder. I cannot open it by clicking on it. Worse, I cannot even cd into it in my terminal.

I would like to keep using absolute paths in my symlinking script. Is there a way to do this?

You must log in to answer this question.

Browse other questions tagged .