1REMOVE(3P)                 POSIX Programmer's Manual                REMOVE(3P)
2
3
4

PROLOG

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

NAME

12       remove - remove a file
13

SYNOPSIS

15       #include <stdio.h>
16
17       int remove(const char *path);
18
19

DESCRIPTION

21       The remove() function shall  cause  the  file  named  by  the  pathname
22       pointed  to  by  path to be no longer accessible by that name. A subseā€
23       quent attempt to open that file using that name shall fail,  unless  it
24       is created anew.
25
26       If  path does not name a directory, remove(path) shall be equivalent to
27       unlink(path).
28
29       If  path  names  a  directory,  remove(path)  shall  be  equivalent  to
30       rmdir(path).
31

RETURN VALUE

33       Refer to rmdir() or unlink().
34

ERRORS

36       Refer to rmdir() or unlink().
37
38       The following sections are informative.
39

EXAMPLES

41   Removing Access to a File
42       The  following  example  shows  how  to  remove  access to a file named
43       /home/cnd/old_mods.
44
45
46              #include <stdio.h>
47
48
49              int status;
50              ...
51              status = remove("/home/cnd/old_mods");
52

APPLICATION USAGE

54       None.
55

RATIONALE

57       None.
58

FUTURE DIRECTIONS

60       None.
61

SEE ALSO

63       rmdir(), unlink(), the Base Definitions volume of IEEE Std 1003.1-2001,
64       <stdio.h>
65
67       Portions  of  this text are reprinted and reproduced in electronic form
68       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
69       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
70       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
71       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
72       event of any discrepancy between this version and the original IEEE and
73       The  Open Group Standard, the original IEEE and The Open Group Standard
74       is the referee document. The original Standard can be  obtained  online
75       at http://www.opengroup.org/unix/online.html .
76
77
78
79IEEE/The Open Group                  2003                           REMOVE(3P)
Impressum