Provided by: manpages-ko-dev_4.27.0-1_all bug

이름

       rmdir - 디렉토리 삭제.

라이브러리

       표준 C 라이브러리 (libc, -lc)

요약

       #include <unistd.h>

       int rmdir(const char *pathname);

설명

       rmdir() 는 디렉토리(꼭 비어 있어야만한다.)를 삭제한다.

반환값

       On success, zero is returned.  On error, -1 is returned, and errno is set to indicate the error.

에러

       EACCES 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 가 접근할수 있는 주소 공간외를 가리키고 있다.

       EINVAL pathname has . as last component.

       ELOOP  pathname 의 링크가 너무 많다.

       ENAMETOOLONG
              pathname이 너무 길다.

       ENOENT pathname 에 있는 디렉토리 요소가 존재하지 않거나 붙어다니는 상징 연결이다.

       ENOMEM 이용할수 있는 커널 메모리가 충분하지 않다.

       ENOTDIR
              pathname, 이나 pathname 의 디렉토리가 사실 디렉토리가 아니다.

       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  pathname을 포함한 파일 시스템이 디렉토리 삭제를 지원하지 않는다.

       EROFS  pathname refers to a directory on a read-only filesystem.

표준

       POSIX.1-2008.

이력

       POSIX.1-2001, SVr4, 4.3BSD.

버그

       NFS프로토콜의 부적적한 표현은 현재 쓰고 있는 디렉토리의 기대하지 않은 소실을 야기 할 수 있다.

추가 참조

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

번역

       이 매뉴얼 페이지의 한국어 번역은 다음에 의해 편집되었습니다: ASPLINUX <man@asp-linux.co.kr>

       이  번역은  무료  문서입니다. 저작권 조건에 대해서는 GNU General Public License 버전 3 이상을 읽으십시오.
       책임이 없습니다.

       이  매뉴얼  페이지의  번역에서   오류를   발견하면   translation-team-ko@googlegroups.com   로   이메일을
       보내주십시오.

Linux man-pages 6.9.1                            2024년 5월 2일                                         rmdir(2)