| 1 | .th LINK II 8/5/73 |
| 2 | .sh NAME |
| 3 | link \*- link to a file |
| 4 | .sh SYNOPSIS |
| 5 | (link = 9.) |
| 6 | .br |
| 7 | .ft B |
| 8 | sys link; name1; name2 |
| 9 | .s3 |
| 10 | link(name1, name2) |
| 11 | .br |
| 12 | char *name1, *name2; |
| 13 | .ft R |
| 14 | .sh DESCRIPTION |
| 15 | A link |
| 16 | to |
| 17 | .it name1 |
| 18 | is created; |
| 19 | the link has the name |
| 20 | .it name2. |
| 21 | Either name may be an arbitrary path name. |
| 22 | .sh "SEE ALSO" |
| 23 | link(I), unlink(II) |
| 24 | .sh DIAGNOSTICS |
| 25 | The error bit |
| 26 | (c-bit) is set when |
| 27 | .it name1 |
| 28 | cannot be found; when |
| 29 | .it name2 |
| 30 | already exists; when the directory of |
| 31 | .it name2 |
| 32 | cannot be written; when |
| 33 | an attempt is made to link to a directory by a user |
| 34 | other than the super-user; |
| 35 | when an attempt is made to link |
| 36 | to a file on another file system. |
| 37 | From C, a \*-1 return indicates an error, |
| 38 | a 0 return indicates success. |