Alias can’t be opened


This is about a MacBook running on 10.10.5 whose disk has recently been repaired (to try to solve the present issue) using Disk Utility. I created an alias as follows:

$ cd ~/Desktop
$ ls -ld
drwx------+ 13 erwann  staff  442 Jul 14 12:41 .
$ touch
$ mkdir baz
$ ln -s baz   
$ ls -l baz
total 8
lrwxr-xr-x  1 erwann  staff  7 Jul 15 11:02 ->

Next, I use Finder to 'Show [the] original' associated with the alias created in 'baz'. I get:

The alias “” can’t be opened because the original item can’t be found.

Any suggestion to fix this?

Best Answer

The link needs an absolute path.

ln -s baz

will create an alias in baz pointing to the file But the file baz/ does not exist, hence the error you received.

You want:

ln -s ~/Desktop/ baz

which will create an alias in the baz directory pointing to ~/Desktop/