The “ln” command

Use this command to create a symbolic link to a file or a directory.

NetStorage does not support the creation of hard links. When using the ln command in CMShell, creation of a symlink is implied. (The -s option is applied by default.) A symbolic link is a file that points to another file, much like a shortcut. You can point a symlink to a file, directory, or both.

Command format:
ln <OPTION> <TARGET> <LINKNAME>
This example includes a single file as well as a directory are targeted for symlink creation.
ln -v /123456/videos/movie.mp4 /123456/videos/subtitles /123456/symlinks

Available options

The “<OPTION>” variable displayed in the above example can be populated with any of the following options:

Option Description
-f, --force Remove any existing destination files if they exist.
-n, --no-dereference Do not follow the target if it is a symbolic link. Treat a symlink to a directory as if it were a normal file.
-s, --symbolic Create symbolic links instead of hard links.
Note: This is applied by default.
-v, --verbose Display the operation’s execution step by step.
-h, --help Display help information for this command.