PreviousNext

Creating a Soft Link

Use the DCE control program's (dcecp) link create command to create a soft link. In addition to the name for the new soft link, you must specify the soft link's destination name, or existing name to which the new soft link points, with the -to option. You can specify any name in the local cell namespace or in any foreign cell namespace, as the destination name, including another soft link.

To create a soft link, you must have insert permission to the directory in which you intend to create the soft link.

Note: If you create a soft link that points to another soft link, make sure you do not create a soft link loop. A soft link loop occurs when you specify a destination name that eventually points back to the new soft link's own link name. The clerk detects this error.

All soft links that you create with the link create command are permanent and never expire unless you use the command's -timeout option to specify an expiration date and time value for the CDS_LinkTimeout attribute of the soft link. Enter the expiration date and time value in the format

yyyy-mm-dd-hh:mm:ss.

For example, the following value indicates that, if the soft link still exists (that is, has not been deleted manually) on August 25, 1994, at 4:00 p.m., CDS will automatically delete it the next time the directory in which it is stored is skulked.

CDS_LinkTimeout=(1994-08-25-16:00:00)

If you use the -timeout option to specify an expiration value for a soft link's CDS_LinkTimeout attribute, you can also specify an extension value, which is a period of time to be added to the expiration date and time that are already assigned. Enter the extension value in the format ddd-hh:mm:ss. For example, a value of 030-00:00:00 indicates that, if the destination name of the soft link still exists when the assigned expiration date and time are reached, CDS allows another 30 days to pass before it again checks, during a skulk, for the existence of the destination name. If, at that time, the destination name cannot be found, CDS deletes the soft link.

The following command creates a permanent soft link named /.:/sales/asia that points to a directory named /.:/sales/eur:

dcecp> link create /.:/sales/asia -to /.:/sales/eur
dcecp>

The following command creates a soft link named /.:/mfg/robo1 that points to an object entry named /.:/mfg/robotics_controller01 and sets its expiration date and time:

dcecp> link create /.:/mfg/robo1 -to /.:/mfg/robotics_controller01 \
-timeout 1994-12-12-09:00:00
dcecp>

In the preceding command, the expiration date and time placed in the CDS_LinkTimeout attribute value indicates that CDS will delete the soft link /.:/mfg/robo1 on the next skulk after December 12, 1994, at 9:00 a.m.

The following command creates a soft link that is named /.:/admin/linka that points to an object entry named /.:/sales/discount_stats:

dcecp> link create /.:/admin/linka -to /.:/sales/discount_stats -timeout \
{1994-01-11-12:00:00 090-00:00:00}
dcecp>

In the preceding command, the expiration time placed in the CDS_LinkTimeout attribute value indicates that CDS will check that the destination name /.:/sales/discount_stats still exists on the next skulk after January 11, 1994, at 12:00 p.m. If the destination name does not exist, CDS deletes the soft link. If the destination name still exists, the soft link remains in effect for another 90 days, as specified by the extension time specified for the CDS_LinkTimeout attribute value 090-00:00:00. When the 90-day extension period expires, CDS repeats the check at 90-day intervals until the destination name is deleted.