16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Portability<br />

X/Open Portability Guide, <strong>UNIX</strong> <strong>System</strong> V.<br />

Related Information<br />

cat, head, read, sh, tail<br />

link — Create a hard link to a file<br />

Format<br />

Description<br />

Localization<br />

Exit Values<br />

link oldfile newfile<br />

link creates a hard link to an existing file. A link is a new directory entry that refers<br />

to the same file. This entry can be in the same directory that currently contains the<br />

file or in a different directory. The result is that you get a new pathname that refers<br />

to the file. You can access the file under the old or new pathname since both<br />

pathnames are of equal importance. If you use rm to remove one pathname, the<br />

other remains and the file contents are still available under that name. The contents<br />

of the file do not disappear until the last remaining link associated with the file is<br />

removed.<br />

Following the format, new becomes a new pathname for the existing file old. If old<br />

names a symbolic link, link creates a hard link to the file that results from resolving<br />

the pathname contained in the symbolic link.<br />

Links are allowed to files only, not to directories. A file can have any number of links<br />

to it. Thus, you can establish any number of different pathnames for any file.<br />

link is implemented as a shell built-in.<br />

link uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

v LC_SYNTAX<br />

v NLSPATH<br />

See Appendix F for more information.<br />

0 Successful completion<br />

1 Failure due to any of the following:<br />

v A file specified could not be found<br />

v No write permission on the directory intended to contain the link<br />

v No search permission on a pathname component of old or new<br />

v No permission to access old<br />

v The pathname of one of the arguments is a directory<br />

v The new link file already exists<br />

2 Failure due to incorrect number of arguments<br />

line<br />

Chapter 2. Shell command descriptions 347

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!