LN Command

HSI Version: 



Creates a link (hard or symbolic) from one HPSS node to another



Command Format: 

ln [-f ] [- h] [-n ] [ -s ] srcname target

ln [-f ] [- h] [-n ] [ -s ] srcname [ srcname ... ] targetdir


-f : Unlink any already existing file, permitting the link to occur

-h : If the target_file or target_dir is a symbolic link, do not follow it. This is most useful with the -f option, to replace a symlink which may point to a directory.

-n : Same as -h, for compatibility with other ln implementations.

-s : Create a symbolic link.



Usage Notes: 

srcname must be an existing node; target must be a non-existent node unless it is a 

directory, or -f is specified.


1. If the second form of the command is used, where targetdir is specified, then

   the last component of srcname is used when creating the target symlink.   

   For example, assuming directory toms_files exists:

      ln -s /home/users/tom/testfile someOtherFile toms_files

     would create the links:

         toms_files/testfile -> /home/users/tom/testfile

         toms_files/someOtherFile -> someOtherFile

2. To create a link in the current directory that points to the same object in targetdir,

    the correct form is:

      ln -s targetdir/srcname srcname

    resulting in:

           srcname -> targetdir/srcname



Related Command(s):