Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
l
ln(1) ln(1)
to file; an lstat() must be performed to obtain information about the link (see stat(2)). A
readlink() call can be used to read the contents of the symbolic link (see readlink(2)).
Symbolic links may span file systems and refer to directories.
Access Control Lists (ACLs)
If optional ACL entries are associated with new_file, ln displays a plus sign (+) after the access mode when
asking permission to overwrite the file.
If new_file is a new file, it inherits the access control list of file1, altered to reflect any difference in owner-
ship between the two files (see acl(5) and aclv(5)). In JFS file systems, new files created by ln do not
inherit their parent directory’s default ACL entries (if any), but instead retain their original ACLs.
EXTERNAL INFLUENCES
Environment Variables
LC_CTYPE determines the interpretation of text as single byte and/or multibyte characters.
LANG and LC_CTYPE determine the local language equivalentof y (for yes/no queries).
LANG determines the language in which messages are displayed.
If LC_CTYPE is not specified in the environment or is set to the empty string, the value of
LANG is used as
a default for each unspecified or empty variable. If
LANG is not specified or is set to the empty string, a
default of
C (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid
setting, ln behaves as if all internationalization variables are set to
C. See environ(5).
International Code Set Support
Single byte and multibyte character code sets are supported.
EXAMPLES
The following command creates
file1 and file2 in dest_dir, which are linked back to the original
files file1 and file2:
ln -f file1 file2 dest_dir
If file1 and/or file2 exists in the destination directory, it is removed and replaced by a link to
file1
or file2, respectively. If existing file
file1 or file2 is a link to another file or a file with links, the
existing file remains. Only the link is broken and replaced by a new link to
file1 or
file2.
WARNINGS
ln does not create hard links across file systems.
DEPENDENCIES
NFS
Access control lists of networked files are summarized (as returned in st_mode by stat()), but not
copied to the new file. When using
ln on such les, a + is not printed after the mode value when asking
for permission to overwrite a file.
AUTHOR
ln was developed by AT&T, the University of California, Berkeley and HP.
SEE ALSO
cp(1), cpio(1), mv(1), rm(1), link(1M), readlink(2), stat(2), symlink(2), symlink(4), acl(5), aclv(5).
STANDARDS CONFORMANCE
ln: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
Section 1454 2 HP-UX Release 11i: December 2000
___
___