Creating a symbolic link to a folder with ln command

I'm setting up the document root of my web server to point to a folder elsewhere on the disk. Should I be using a hard link, or a soft link, with the ln command?

Also, I'm having trouble getting the symbolic link pointing to a directory. I get the message ln: /Users/me/directory/: Is a directory when I try to set up the link.

3

1 Answer

A soft link is enough for your purpose. You simply need to omit the trailing slash, i.e.

ln -s ~/me
6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like