1UNLINK(1P) POSIX Programmer's Manual UNLINK(1P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 unlink — call the unlink() function
13
15 unlink file
16
18 The unlink utility shall perform the function call:
19
20
21 unlink(file);
22
23 A user may need appropriate privileges to invoke the unlink utility.
24
26 None.
27
29 The following operands shall be supported:
30
31 file The pathname of an existing file.
32
34 Not used.
35
37 Not used.
38
40 The following environment variables shall affect the execution of
41 unlink:
42
43 LANG Provide a default value for the internationalization vari‐
44 ables that are unset or null. (See the Base Definitions vol‐
45 ume of POSIX.1‐2017, Section 8.2, Internationalization Vari‐
46 ables for the precedence of internationalization variables
47 used to determine the values of locale categories.)
48
49 LC_ALL If set to a non-empty string value, override the values of
50 all the other internationalization variables.
51
52 LC_CTYPE Determine the locale for the interpretation of sequences of
53 bytes of text data as characters (for example, single-byte as
54 opposed to multi-byte characters in arguments).
55
56 LC_MESSAGES
57 Determine the locale that should be used to affect the format
58 and contents of diagnostic messages written to standard
59 error.
60
61 NLSPATH Determine the location of message catalogs for the processing
62 of LC_MESSAGES.
63
65 Default.
66
68 None.
69
71 The standard error shall be used only for diagnostic messages.
72
74 None.
75
77 None.
78
80 The following exit values shall be returned:
81
82 0 Successful completion.
83
84 >0 An error occurred.
85
87 Default.
88
89 The following sections are informative.
90
92 None.
93
95 None.
96
98 None.
99
101 None.
102
104 link, rm
105
106 The Base Definitions volume of POSIX.1‐2017, Chapter 8, Environment
107 Variables
108
109 The System Interfaces volume of POSIX.1‐2017, unlink()
110
112 Portions of this text are reprinted and reproduced in electronic form
113 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
114 table Operating System Interface (POSIX), The Open Group Base Specifi‐
115 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
116 Electrical and Electronics Engineers, Inc and The Open Group. In the
117 event of any discrepancy between this version and the original IEEE and
118 The Open Group Standard, the original IEEE and The Open Group Standard
119 is the referee document. The original Standard can be obtained online
120 at http://www.opengroup.org/unix/online.html .
121
122 Any typographical or formatting errors that appear in this page are
123 most likely to have been introduced during the conversion of the source
124 files to man page format. To report such errors, see https://www.ker‐
125 nel.org/doc/man-pages/reporting_bugs.html .
126
127
128
129IEEE/The Open Group 2017 UNLINK(1P)