|
|
1.1 root 1: .th UNLINK II 8/5/73
2: .sh NAME
3: unlink \*- remove directory entry
4: .sh SYNOPSIS
5: (unlink = 10.)
6: .br
7: .bt B
8: sys unlink; name
9: .s3
10: unlink(name)
11: .br
12: char *name;
13: .ft R
14: .sh DESCRIPTION
15: .it Name
16: points to a null-terminated string.
17: .it Unlink
18: removes the entry for the file pointed to by
19: .it name
20: from its directory.
21: If this entry was the last link to the file,
22: the contents of the file are freed and the file is destroyed.
23: If, however, the file was open in any process, the actual
24: destruction is delayed until it is closed, even though
25: the directory entry has disappeared.
26: .sh "SEE ALSO"
27: rm(I), rmdir(I), link(II)
28: .sh DIAGNOSTICS
29: The error bit
30: (c-bit) is set to indicate that the file does not
31: exist or that its directory cannot be written.
32: Write permission is not required on the file itself.
33: It is also illegal to unlink a directory
34: (except for the super-user).
35: From C, a \*-1 return indicates an error.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.