rmdir - Online Linux Manual PageSection : 2
Updated : 2022-10-30
Source : Linux man-pages 6.03

NAMErmdir − delete a directory

LIBRARYStandard C library (libc, −lc)

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

DESCRIPTIONrmdir() deletes a directory, which must be empty.

RETURN VALUEOn success, zero is returned. On error, −1 is returned, and errno is set to indicate the error.

ERRORSEACCES  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).) EBUSY  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. EFAULT  pathname points outside your accessible address space. EINVAL  pathname has .I . as last component. ELOOP  Too many symbolic links were encountered in resolving pathname. ENAMETOOLONG  pathname was too long. ENOENT  A directory component in pathname does not exist or is a dangling symbolic link. ENOMEM  Insufficient kernel memory was available. ENOTDIR  pathname, or a component used as a directory in pathname, is not, in fact, a directory. ENOTEMPTY  pathname contains entries other than . and .. ; or, pathname has .. as its final component. POSIX.1 also allows EEXIST for this condition. EPERM  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). EPERM  The filesystem containing pathname does not support the removal of directories. EROFS  pathname refers to a directory on a read-only filesystem.

STANDARDSPOSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.

BUGSInfelicities in the protocol underlying NFS can cause the unexpected disappearance of directories which are still being used.

SEE ALSOrm(1), rmdir(1), chdir(2), chmod(2), mkdir(2), rename(2), unlink(2), unlinkat(2)
0
Johanes Gumabo
Data Size   :   9,756 byte
man-rmdir.2Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 181,859
Visitor ID   :     :  
Visitor IP   :   3.133.136.95   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.