link, unlink
PURPOSE
Performs a link or unlink system call.
SYNOPSIS
link [ file1 file2 ]
unlink [ file ]
DESCRIPTION
The link and unlink commands perform the corresponding
system calls of the same name on the specified file,
abandoning all error checking. These commands can be run
only by a user operating with superuser authority (see
"su"). You should be familiar with the link and unlink
system calls described in AIX Operating System Technical
Reference.
The link and unlink commands do not issue error messages
when the associated system call fails; you must check the
exit value to determine if the command completed
normally. Each returns a 0 if it succeeds, a 1 if you
specify too few or too many parameters, and a 2 if its
system call fails.
Warning: The link and unlink commands allow the super-
user to deal with unusual problems, such as moving an
entire directory to a different part of the directory
tree. They also permit you to create directories that
cannot be reached or escaped from. Be careful to pre-
serve directory structure.
To preserve directory structure observe the following
rules:
o Be certain every directory has a . (dot) link to
itself.
o Be certain every directory has a .. (dot dot) link
to its parent directory.
o Be certain every directory has no more than one link
to it.
o Be certain every directory is accessible from the
root of its file system.
Note: If the . (dot) entry has been destroyed and fsck
is unable to repair it (a rare occurrence), you can use
the link command to restore the . (dot) entry of the
damaged directory with the command: link dir dir/.
where dir is the name of the damaged directory. However
use this only as a last resort when the directory is
destroyed and fsck is unable to fix it.
RELATED INFORMATION
The following commands: "ln" and "fsck, dfsck."
The link and unlink system calls in AIX Operating System
Technical Reference.