Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to do this thing:

  • Create a link to a folder.
  • Put this link in home (~) directory
  • Access files in linked folder from home directory (~/LinkToFolder/file)

What is the best way to it?

Main Problem. I have a set of scripts, that lay in specific folder in git repository local clone. I want to access them from home directory in very simple way.

perl ~/LinkToFolder/ param1 param2

share|improve this question
up vote 3 down vote accepted

You can do this with Symlinks:

ln -s /path/to/original/location /path/to/intended/shortcut

For example, if you want ~/Scripts to go to ~/Dropbox/Documents/Scripts you can do…

ln -s ~/Dropbox/Documents/Scripts ~/Scripts

Then open ~/Scripts/ will open the file at ~/Dropbox/Documents/Scripts/

To see the symlink you can run ls -laPGh ~/Scripts.

For example, I have my Mobile Documents folder symlinked as iCloud, so…

ls -lapGh ~/iCloud
lrwxr-xr-x@ 1 grgarside  staff    41B 12 Nov  2012 iCloud -> /Users/grgarside/Library/Mobile Documents
share|improve this answer
good answer, but I want to add, that I must put absolute path as original location :) Please, add this information to answer – gaussblurinc Dec 27 '13 at 10:56
@gaussblurinc It should work also with relative paths and with ~ (it will be expanded by the shell). Which problem did you have? – Matteo Dec 27 '13 at 11:00
@Matteo I go to my directory and make ln -s Scripts/ ~/Scripts. This thing won't work for me, it seems, that symlink doesn't point on original :( – gaussblurinc Dec 27 '13 at 11:07
@gaussblurinc: ln -s THE_File_or_DIR_POINTED_AT The_NEW_SYMLINK. So ln -s /path/to/Scripts ~/Scripts will create in your homedir a "Scripts" symlink pointing at /path/to/Scripts . Do not use "~" elsewhere (ie, in the first parameter, for example) as it's only useable in some conditions, but not always. "~" is only evaluated to your homedir in special (common) cases, but not always. – Olivier Dulac Dec 27 '13 at 14:31
@gaussblurinc : not also that ls -al /the/symlink will list the symlink itself. ls -al /the/symlink/ [note the trailing /] will list the content of the directory pointed at. Ie, beware of some special side-effects of using a symlink. – Olivier Dulac Dec 27 '13 at 14:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.