Tuesday 2 March 2010

Symlinks or Symbolic links in MAC

Here is the way and explanation on how to create symbolic links on Mac:

ln -s -i -v target linkname

where
  • -s means that I want to create a symbolic link
  • -i means that I will be prompted if the symlink already exists
  • -v means that I'll see a message confirming that the symlink was created
  • target is the path to the file or folder that I want to point to
  • linkname is the path and name of the symlink file that I want to create
For example, to create a symlink to the file /Users/username/Documents/test.txt, and place that symlink in my home directory, I would use this command:
ln -s -i -v /Users/username/Documents ~/doc

I found the above in following post:


Bob's blog 


Thanks to Bob for this post.