.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Modified by Michael Haardt .\" Modified 1993-07-21 by Rik Faith .\" Modified 1995-04-15 by Michael Chastain : .\" Added 'fchdir'. Fixed bugs in error section. .\" Modified 1996-10-21 by Eric S. Raymond .\" Modified 1997-08-21 by Joseph S. Myers .\" Modified 2004-06-23 by Michael Kerrisk .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH chdir 2 "2023년 3월 30일" "Linux man\-pages 6.05.01" .SH 이름 chdir, fchdir \- 작업 디렉토리를 바꾼다. .SH 라이브러리 표준 C 라이브러리 (\fIlibc\fP, \fI\-lc\fP) .SH 요약 .nf \fB#include \fP .PP \fBint chdir(const char *\fP\fIpath\fP\fB);\fP \fBint fchdir(int \fP\fIfd\fP\fB);\fP .fi .PP .RS -4 Feature Test Macro Requirements for glibc (see \fBfeature_test_macros\fP(7)): .RE .PP \fBfchdir\fP(): .nf .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED _XOPEN_SOURCE >= 500 || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L || /* glibc up to and including 2.19: */ _BSD_SOURCE .fi .SH 설명 \fBchdir\fP() changes the current working directory of the calling process to the directory specified in \fIpath\fP. .PP \fBfchdir\fP() is identical to \fBchdir\fP(); the only difference is that the directory is given as an open file descriptor. .SH 반환값 On success, zero is returned. On error, \-1 is returned, and \fIerrno\fP is set to indicate the error. .SH 에러 파일 시스템에 의존적이며, 다른 에러가 리턴될 수 있다. \fBchdir\fP()에서 발생하는 일반적인 에러는 다음과 같다: .TP \fBEACCES\fP Search permission is denied for one of the components of \fIpath\fP. (See also \fBpath_resolution\fP(7).) .TP \fBEFAULT\fP \fIpath\fP가 접근할 수 없는 메모리 영역을 가리키고 있다. .TP \fBEIO\fP I/O 에러가 발생했다. .TP \fBELOOP\fP \fIpath\fP를 찾아갈 때, 너무 많은 심볼릭 링크가 존재한다. .TP \fBENAMETOOLONG\fP \fIpath\fP 가 너무 길다. .TP \fBENOENT\fP The directory specified in \fIpath\fP does not exist. .TP \fBENOMEM\fP 이용할수 있는 커널 메모리가 충분하지 않다. .TP \fBENOTDIR\fP \fIpath\fP가 디렉토리가 아니다. .PP \fBfchdir\fP()에서 발생하는 일반적인 에러는 다음과 같다: .TP \fBEACCES\fP \fIfd\fP로 지정된 디렉토리를 여는데 허가가 거부되었다. .TP \fBEBADF\fP \fIfd\fP가 유효한 파일 기술자가 아니다. .TP \fBENOTDIR\fP \fIfd\fP does not refer to a directory. .SH 표준 POSIX.1\-2008. .SH 이력 POSIX.1\-2001, SVr4, 4.4BSD. .SH 주의 The current working directory is the starting point for interpreting relative pathnames (those not starting with \[aq]/\[aq]). .PP A child process created via \fBfork\fP(2) inherits its parent's current working directory. The current working directory is left unchanged by \fBexecve\fP(2). .SH "추가 참조" \fBchroot\fP(2), \fBgetcwd\fP(3), \fBpath_resolution\fP(7) .PP .SH 번역 이 매뉴얼 페이지의 한국어 번역은 다음에 의해 편집되었습니다: 정강훈 . .PP 이 번역은 무료 문서입니다. 저작권 조건에 대해서는 .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License 버전 3 .UE 이상을 읽으십시오. 책임이 없습니다. .PP 이 매뉴얼 페이지의 번역에서 오류를 발견하면 .MT translation-team-ko@googlegroups.com .ME 로 이메일을 보내주십시오.