A SERVICE OF

logo

Chapter 5 391
Command Definitions L-O
NEWLINK
Examples
The following tree structure will be used to construct the examples that follow it. Assume
that the CWD is /ACCT1/PUB.
ROOT
|-
| | |
ACCT1 dir SOFTWARE
| / \ |
- f1 f2
| | | |
PUB dir1 PUB CODE
| / \ | |
- file1 file2 ACCTORG -
| | | | | |
ACCTUDC FILE3 COMMON TERMIO COMPALL dir2
/ | \
f1 f2 dir3
To create a symbolic link named PAYCODE to the file PAYROLL.CODE.SOFTWARE,
enter the following command:
:NEWLINK LINK=PAYCODE; TO=PAYROLL.CODE.SOFTWARE
Or, optionally use the positional parameters and enter:
:NEWLINK PAYCODE, PAYROLL.CODE.SOFTWARE
You now can access PAYROLL.SAFE.SOFTWARE through PAYCODE. For example, if you
have read access to the file PAYROLL.CODE.SOFTWARE, you may enter the following
command to print the contents of the file:
:PRINT PAYCODE
To create a symbolic link named FARFILE in PUB.ACCT1 that references
/SOFTWARE/CODE/dir2/f1, enter the following command:
:NEWLINK LINK=FARFILE; TO=/SOFTWARE/CODE/dir2/f1
Suppose that file COMMON.CODE.SOFTWARE contains information that is used
frequently. To display the contents of the file the following command has been used:
:PRINT COMMON.CODE.SOFTWARE
By creating a symbolic link to the file, you can simplify what users need to type to print it.
For example:
:NEWLINK COMMON, COMMON.CODE.SOFTWARE
:PRINT COMMON
Suppose that a user is currently logged on as USER1 in the group PUB.SOFTWARE. To
access the files in /ACCT1/dir1 directory without entering the full path name each time,
USER1 may establish a link named "morecode" to that directory as follows:
:NEWLINK LINK=./morecode; TO=/ACCT1/dir1
Then, to get a list of the files under /acct1/dir1/, the user enters:
:LISTFILE ./morecode/
Absolute symbolic links