HPlogo New Features of MPE/iX: Using the Hierarchical File System: 300 MPE/iX Computer Systems > Chapter 7 Managing Files

Using Symbolic Links

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Symbolic links are permanent MPE/iX files that can be created, removed, and renamed.

Creating symbolic links

You can use the NEWLINK command to create a symbolic link to a file, group, account, root, or another directory. Suppose that you log on as follows:

   :hello dmarcon, engineer.develop, pxgroup

You can create a symbolic link SYMLN and associate it with the target file TAXINFO.FEB92.PAYROLL as follows:

   :newlink symln, taxinfo.feb92.payroll

or

   :newlink ./SYMLN, /PAYROLL/FEB92/TAXINFO

This creates a file called SYMLN under group PXGROUP of account DEVELOP. Assuming that you (that is, dmarcon) have the appropriate access to the target file (i.e., taxinfo), you can use the PRINT command to examine the contents of the target file as follows:

   :print symln

instead of

   :print taxinfo.FEB92.payroll

Deleting symbolic links

You can use the PURGELINK command to remove a symbolic link. This command takes the name of the symbolic link and deletes it without affecting the target of that link. For example, if you (that is, dmarcon) wanted to remove the symbolic link SYMLN, you would do the following:

   :purgelink symln

or

   :purgelink ./SYMLN

Renaming symbolic links

Symbolic links can be renamed by calling the POSIX C-library function of rename().

The MPE/iX command RENAME does not rename the symbolic link itself, but the file pointed to by the symbolic link.

Archiving symbolic links

Symbolic links can be stored and restored to your MPE/iX system by using the MPE/iX STORE and RESTORE commands like any other file on the system.

Feedback to webmaster