logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

remove.3p (2717B)


  1. '\" et
  2. .TH REMOVE "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. remove
  12. \(em remove a file
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <stdio.h>
  17. .P
  18. int remove(const char *\fIpath\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The functionality described on this reference page is aligned with the
  22. ISO\ C standard. Any conflict between the requirements described here and the
  23. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  24. .P
  25. The
  26. \fIremove\fR()
  27. function shall cause the file named by the pathname pointed to by
  28. .IR path
  29. to be no longer accessible by that name. A subsequent attempt to open
  30. that file using that name shall fail, unless it is created anew.
  31. .P
  32. If
  33. .IR path
  34. does not name a directory, \fIremove\fP(\fIpath\fP) shall be equivalent
  35. to \fIunlink\fP(\fIpath\fP).
  36. .P
  37. If
  38. .IR path
  39. names a directory, \fIremove\fP(\fIpath\fP) shall be equivalent to
  40. \fIrmdir\fP(\fIpath\fP).
  41. .SH "RETURN VALUE"
  42. Refer to
  43. .IR "\fIrmdir\fR\^(\|)"
  44. or
  45. .IR "\fIunlink\fR\^(\|)".
  46. .SH ERRORS
  47. Refer to
  48. .IR "\fIrmdir\fR\^(\|)"
  49. or
  50. .IR "\fIunlink\fR\^(\|)".
  51. .LP
  52. .IR "The following sections are informative."
  53. .SH EXAMPLES
  54. .SS "Removing Access to a File"
  55. .P
  56. The following example shows how to remove access to a file named
  57. .BR /home/cnd/old_mods .
  58. .sp
  59. .RS 4
  60. .nf
  61. #include <stdio.h>
  62. .P
  63. int status;
  64. \&...
  65. status = remove("/home/cnd/old_mods");
  66. .fi
  67. .P
  68. .RE
  69. .SH "APPLICATION USAGE"
  70. None.
  71. .SH RATIONALE
  72. None.
  73. .SH "FUTURE DIRECTIONS"
  74. None.
  75. .SH "SEE ALSO"
  76. .IR "\fIrmdir\fR\^(\|)",
  77. .IR "\fIunlink\fR\^(\|)"
  78. .P
  79. The Base Definitions volume of POSIX.1\(hy2017,
  80. .IR "\fB<stdio.h>\fP"
  81. .\"
  82. .SH COPYRIGHT
  83. Portions of this text are reprinted and reproduced in electronic form
  84. from IEEE Std 1003.1-2017, Standard for Information Technology
  85. -- Portable Operating System Interface (POSIX), The Open Group Base
  86. Specifications Issue 7, 2018 Edition,
  87. Copyright (C) 2018 by the Institute of
  88. Electrical and Electronics Engineers, Inc and The Open Group.
  89. In the event of any discrepancy between this version and the original IEEE and
  90. The Open Group Standard, the original IEEE and The Open Group Standard
  91. is the referee document. The original Standard can be obtained online at
  92. http://www.opengroup.org/unix/online.html .
  93. .PP
  94. Any typographical or formatting errors that appear
  95. in this page are most likely
  96. to have been introduced during the conversion of the source files to
  97. man page format. To report such errors, see
  98. https://www.kernel.org/doc/man-pages/reporting_bugs.html .