rmdir(2) System Calls Manual rmdir(2) NOM rmdir - Supprimer un repertoire BIBLIOTHEQUE Bibliotheque C standard (libc, -lc) SYNOPSIS #include int rmdir(const char *path); DESCRIPTION rmdir() supprime un repertoire, lequel doit etre vide. VALEUR RENVOYEE En cas de succes, zero est renvoye. En cas d'erreur, -1 est renvoye et errno est definie pour preciser l'erreur. ERREURS EACCES Write access to the directory containing path was not allowed, or one of the directories in the path prefix of path did not allow search permission. (See also path_resolution(7).) EBUSY path is currently in use by the system or some process that prevents its removal. On Linux, this means path is currently used as a mount point or is the root directory of the calling process. EFAULT path pointe en dehors de l'espace d'adressage accessible. EINVAL path has . as last component. ELOOP path contient une reference circulaire (a travers un lien symbolique) ENAMETOOLONG path etait trop long. ENOENT Un des repertoires du chemin d'acces chemin n'existe pas ou est un lien symbolique pointant nulle part. ENOMEM La memoire disponible du noyau n'etait pas suffisante. ENOTDIR path, or a component used as a directory in path, is not, in fact, a directory. ENOTEMPTY path contains entries other than . and ..; or, path has .. as its final component. POSIX.1 also allows EEXIST for this condition. EPERM The directory containing path 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). EPERM The filesystem containing path does not support the removal of directories. EROFS path refers to a directory on a read-only filesystem. NORMES POSIX.1-2024. HISTORIQUE POSIX.1-2001, SVr4, 4.3BSD. BOGUES Des problemes dans le protocole sous-jacent a NFS peuvent provoquer la disparition inattendue de repertoires encore utilises. VOIR AUSSI rm(1), rmdir(1), chdir(2), chmod(2), mkdir(2), rename(2), unlink(2), unlinkat(2) TRADUCTION La traduction francaise de cette page de manuel a ete creee par Christophe Blaess , Stephan Rafin , Thierry Vignaud , Francois Micaux, Alain Portal , Jean-Philippe Guerard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas Francois , Florentin Duneau , Simon Paillard , Denis Barbier , David Prevot , Frederic Hantrais et Jean- Philippe MENGUAL Cette traduction est une documentation libre ; veuillez vous reporter a la GNU General Public License version 3 concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITE LEGALE. Si vous decouvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message a . Pages du manuel de Linux 6.18 8 fevrier 2026 rmdir(2)