| rmdir(2) | System Calls Manual | rmdir(2) |
NOM¶
rmdir - Supprimer un répertoire
BIBLIOTHÈQUE¶
Bibliothèque C standard (libc, -lc)
SYNOPSIS¶
#include <unistd.h>
int rmdir(const char *path);
DESCRIPTION¶
rmdir() supprime un répertoire, lequel doit être vide.
VALEUR RENVOYÉE¶
En cas de succès, zéro est renvoyé. En cas d'erreur, -1 est renvoyé et errno est définie pour préciser 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 référence circulaire (à travers un lien symbolique)
- ENAMETOOLONG
- path était trop long.
- ENOENT
- Un des répertoires du chemin d'accès chemin n'existe pas ou est un lien symbolique pointant nulle part.
- ENOMEM
- La mémoire disponible du noyau n'était 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.
STANDARDS¶
POSIX.1-2008.
HISTORIQUE¶
POSIX.1-2001, SVr4, 4.3BSD.
BOGUES¶
Des problèmes dans le protocole sous-jacent à NFS peuvent provoquer la disparition inattendue de répertoires encore utilisés.
VOIR AUSSI¶
rm(1), rmdir(1), chdir(2), chmod(2), mkdir(2), rename(2), unlink(2), unlinkat(2)
TRADUCTION¶
La traduction française de cette page de manuel a été créée par Christophe Blaess <https://www.blaess.fr/christophe/>, Stéphan Rafin <stephan.rafin@laposte.net>, Thierry Vignaud <tvignaud@mandriva.com>, François Micaux, Alain Portal <aportal@univ-montp2.fr>, Jean-Philippe Guérard <fevrier@tigreraye.org>, Jean-Luc Coulon (f5ibh) <jean-luc.coulon@wanadoo.fr>, Julien Cristau <jcristau@debian.org>, Thomas Huriaux <thomas.huriaux@gmail.com>, Nicolas François <nicolas.francois@centraliens.net>, Florentin Duneau <fduneau@gmail.com>, Simon Paillard <simon.paillard@resel.enst-bretagne.fr>, Denis Barbier <barbier@debian.org>, David Prévot <david@tilapin.org>, Frédéric Hantrais <fhantrais@gmail.com> et Jean-Philippe MENGUAL <jpmengual@debian.org>
Cette traduction est une documentation libre ; veuillez vous reporter à la GNU General Public License version 3 concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE.
Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à debian-l10n-french@lists.debian.org.
| 17 mai 2025 | Pages du manuel de Linux (non publiées) |