Scroll to navigation

rmdir(2) System Calls Manual rmdir(2)

NOMBRE

rmdir - borra un directorio

BIBLIOTECA

Biblioteca Estándar C (libc, -lc)

SINOPSIS

#include <unistd.h>
int rmdir(const char *pathname);

DESCRIPCIÓN

rmdir() borra un directorio, el cual debe estar vacío.

VALOR DEVUELTO

En caso de éxito se devuelve cero. En caso de error se devuelve -1, y errno se configura para indicar el error.

ERRORES

Write access to the directory containing pathname was not allowed, or one of the directories in the path prefix of pathname did not allow search permission. (See also path_resolution(7).)
pathname is currently in use by the system or some process that prevents its removal. On Linux, this means pathname is currently used as a mount point or is the root directory of the calling process.
pathname apunta fuera del espacio de direcciones accesible.
pathname has . as last component.
Se encontraron demasiados enlaces simbólicos al resolver pathname.
pathname es demasiado largo.
Un componente directorio en ruta no existe o es un enlace simbólico colgante.
No hay disponible suficiente memoria del núcleo.
pathname, o un componente usado como un directorio en pathname no es en realidad un directorio.
pathname contains entries other than . and .. ; or, pathname has .. as its final component. POSIX.1 also allows EEXIST for this condition.
The directory containing pathname has the sticky bit (S_ISVTX) set and the process's effective user ID is neither the user ID of the file to be deleted nor that of the directory containing it, and the process is not privileged (Linux: does not have the CAP_FOWNER capability).
El sistema de ficheros que contiene pathname no soporta el borrado de directorios.
pathname refers to a directory on a read-only filesystem.

ESTÁNDARES

POSIX.1-2008.

HISTORIAL

POSIX.1-2001, SVr4, 4.3BSD.

ERRORES

Algunos hechos desafortunados del protocolo NFS subyacente pueden provocar la desaparición inesperada de directorios que todavía se están usando.

VÉASE TAMBIÉN

rm(1), rmdir(1), chdir(2), chmod(2), mkdir(2), rename(2), unlink(2), unlinkat(2)

TRADUCCIÓN

La traducción al español de esta página del manual fue creada por Juan Piernas <piernas@ditec.um.es> y Miguel Pérez Ibars <mpi79470@alu.um.es>

Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.

Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org.

30 Marzo 2023 Páginas de manual de Linux 6.05.01