chdir(2) | System Calls Manual | chdir(2) |
chdir, fchdir - 작업 디렉토리를 바꾼다.
표준 C 라이브러리 (libc, -lc)
#include <unistd.h>
int chdir(const char *path); int fchdir(int fd);
fchdir():
_XOPEN_SOURCE >= 500 || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L || /* glibc up to and including 2.19: */ _BSD_SOURCE
chdir() changes the current working directory of the calling process to the directory specified in path.
fchdir() is identical to chdir(); the only difference is that the directory is given as an open file descriptor.
On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.
파일 시스템에 의존적이며, 다른 에러가 리턴될 수 있다. chdir()에서 발생하는 일반적인 에러는 다음과 같다:
fchdir()에서 발생하는 일반적인 에러는 다음과 같다:
POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD.
The current working directory is the starting point for interpreting relative pathnames (those not starting with '/').
A child process created via fork(2) inherits its parent's current working directory. The current working directory is left unchanged by execve(2).
chroot(2), getcwd(3), path_resolution(7)
이 매뉴얼 페이지의 한국어 번역은 다음에 의해 편집되었습니다: 정강훈 <skyeyes@soback.kornet.net>
이 번역은 무료 문서입니다. 저작권 조건에 대해서는 GNU General Public License 버전 3 이상을 읽으십시오. 책임이 없습니다.
이 매뉴얼 페이지의 번역에서 오류를 발견하면 translation-team-ko@googlegroups.com 로 이메일을 보내주십시오.
2023년 2월 5일 | Linux man-pages 6.03 |