Example symlink to a single file
Include a single “
<TARGET>” variable, defining it as the complete path to a desired file. The
system will create a symbolic link using the value defined as the "
-soption is applied by default.
ln <OPTION> <TARGET> <LINKNAME>
Symlink to a single file
To create a symlink in your current directory for a file located at
symlink.mp4, execute this command:
ln -v /123456/videos/movie.mp4 symlink.mp4
In this example, we've included the "-v" <OPTION> to display the step by step execution from the
$ ln -v /123456/videos/movie.mp4 symlink.mp4 create symbolic link symlink.mp4 to /123456/videos/movie.mp4
/123456/videos/movie.mp4 file is accessible by using the new symlink located at
/123456/symlink.mp4. Performing a list (
ls -l) shows the symlink relationship to the target.
$ ls -l lrwxrwxrwx storageGroup storage 24 Mar 26 20:43 symlink.mp4 -> /123456/videos/movie.mp4 drwxrwxr-x storageGroup storage 0 Mar 26 20:21 videos