Typically, you create hard links, using clients (like NFS) that have existing commands to manipulate links. This section explains how to create a hard link in a volume by accessing the volume from a Linux workstation, then using the Link command (ln) to create a hard link.
Creating a hard link to a file does not copy the contents of the file to the new location; it simply makes a new name by which the file can be known, in addition to the file’s existing name or names. All of the names are equally real, and no one of them is preferred to the others except regarding access control and directory space quotas. For information, see Section 21.1, Understanding Hard Links.
The actual content of the file is maintained in only one place: the original file. Users in different directories can use hard links to access and share the same file. A single user can use hard links to access a file from different directories.
For NSS volumes on NetWare servers that use the new metadata structure, you must enable the Hard Links attribute on the volume to be able to create hard links. For information, see Section 21.2, Enabling or Disabling the Hard Links Attribute (OES SP1 NetWare, NetWare 6.5 SP4).
For NSS volumes on Linux servers, for hard links to work properly, users must be Linux-enabled eDirectory users. For information, see Section 6.3.5, NSS and Linux User Management.
To create a hard link, use the Link (ln) command from a Linux client. At a terminal console, enter
ln /path/filename /linkpath/linkfilename
Replace /path/filename with the path name for the original file. Replace /linkpath/linkfilename with the path name for the hard linked filename. To maximize the number of hard links you can use, choose short names that can be stored optimally in each name space. For information, see Section 21.1, Understanding Hard Links.
For help with syntax and options, refer to the Link Manual Page from a Linux client. At a terminal console, enter
man 2 ln
For example, from a Linux client, you can use the Link command to link the file /tmp/timetest to /usr/tmp/t1, using the following command:
ln /tmp/timetest /usr/tmp/t1
The file can now be referred to by either name. You can delete the original name or any link name, but the contents of the file are not removed until the final name is deleted.