Announcement

Collapse
No announcement yet.

How to create a symlink?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to create a symlink?

    Symbolic link is a special type of file that reference to other file or directory. It is same as creating short cut in Windows. You can create a symlink for your directory using below command from SSH:

    ln -s <destination> <linkname>

    Note: If you remove the original directories then the symbolic will no longer work. However, if you remove symlink then there will not be any effect in target folders.

    You will be able to see inside a directory if there is any symlink exists using below command:

    ls -la

    Thanks,

  • #2
    AccuWeb.Cloud
    Re: How to create a symlink?

    All of the above mentioned create hardlinks. They are slightly different.
    To create a symlink, use the command symlink, instead of ln.
    ln in this case would be using the form:
    ln -s [target] [link name]
    Assuming you are logged in as uli101 this can be done as such:
    ln -s ~/Assign1/ a1
    (Note the space, a1 is not part of the path, it is the second parameter)
    If not, you will need the full path to uli101's home directory, used in a way similar to this:
    ln -s /home/users/uli101/Assign1/ a1

    Thanks.

    Comment

    Working...
    X