Annotation of researchv10dc/man/adm/man2/link.2, revision 1.1.1.1

1.1       root        1: .TH LINK 2
                      2: .CT 2 file_inq_creat
                      3: .SH NAME
                      4: link, symlink, readlink \(mi link to a file
                      5: .SH SYNOPSIS
                      6: .nf
                      7: .B int link(name1, name2)
                      8: .B char *name1, *name2;
                      9: .LP
                     10: .B int symlink(name1, name2)
                     11: .B char *name1, *name2;
                     12: .LP
                     13: .B int readlink(name, buf, size)
                     14: .B char *name, *buf;
                     15: .fi
                     16: .SH DESCRIPTION
                     17: .I Link
                     18: and
                     19: .I symlink
                     20: create a link to file
                     21: .I name1
                     22: with new name
                     23: .IR name2 .
                     24: Either name may be an arbitrary path name.
                     25: .PP
                     26: After
                     27: .IR link ,
                     28: .IR name2
                     29: is entirely equivalent to
                     30: .IR name1 ;
                     31: it is a directory entry referring to the same file as
                     32: .IR name1 .
                     33: Only the super-user can make the link if
                     34: .I name1
                     35: is a directory.
                     36: .PP
                     37: After
                     38: .IR symlink ,
                     39: .I name2
                     40: is a new symbolic link;
                     41: when it is encountered in any path name,
                     42: .IR name1
                     43: is substituted for
                     44: .IR name2 ,
                     45: and path name parsing continues.
                     46: If
                     47: .IR name1
                     48: begins with the 
                     49: .L /
                     50: character, it is interpreted with respect to the
                     51: root directory; if not,
                     52: it is interpreted with respect to the directory in which
                     53: .IR name2
                     54: resides.
                     55: .PP
                     56: Symbolic links are slightly slower than normal links but
                     57: may span file systems;
                     58: normal links are confined to a single file system.
                     59: .PP
                     60: .I Readlink
                     61: copies the pathname inside
                     62: symbolic link
                     63: .I name
                     64: into memory at
                     65: .IR buf .
                     66: No more than
                     67: .IR size
                     68: bytes are copied;
                     69: the actual number of bytes read is returned.
                     70: The contents of
                     71: .I buf
                     72: will not be null-terminated.
                     73: An error is returned if
                     74: .I name
                     75: is not a symbolic link.
                     76: .SH "SEE ALSO"
                     77: .IR cp (1), 
                     78: .IR unlink (2), 
                     79: .IR stat (2)
                     80: .SH DIAGNOSTICS
                     81: all:
                     82: .BR EIO ,
                     83: .BR ELOOP ,
                     84: .BR ENOENT ,
                     85: .BR ENOTDIR
                     86: .br
                     87: .IR link :
                     88: .BR EEXIST ,
                     89: .BR EROFS ,
                     90: .BR EXDEV
                     91: .br
                     92: .IR symlink :
                     93: .BR EEXIST ,
                     94: .BR EROFS
                     95: .br
                     96: .IR readlink :
                     97: .BR ENXIO

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.