1UNLINK(2) System Calls Manual UNLINK(2)
2
3
4
6 unlink - remove directory entry
7
9 unlink(name)
10 char *name;
11
13 Name points to a null-terminated string. Unlink removes the entry for
14 the file pointed to by name from its directory. If this entry was the
15 last link to the file, the contents of the file are freed and the file
16 is destroyed. If, however, the file was open in any process, the
17 actual destruction is delayed until it is closed, even though the
18 directory entry has disappeared.
19
21 rm(1), link(2)
22
24 Zero is normally returned; -1 indicates that the file does not exist,
25 that its directory cannot be written, or that the file contains pure
26 procedure text that is currently in use. Write permission is not
27 required on the file itself. It is also illegal to unlink a directory
28 (except for the super-user).
29
31 (unlink = 10.)
32 sys unlink; name
33
34
35
36 UNLINK(2)