chdir(2) System Calls Manual chdir(2) NOMBRE chdir, fchdir - cambia el directorio de trabajo BIBLIOTECA Biblioteca Estandar C (libc, -lc) SINOPSIS #include int chdir(const char *path); int fchdir(int fd); Requisitos de Macros de Prueba de Caracteristicas para glibc (vease feature_test_macros(7)): fchdir(): _XOPEN_SOURCE >= 500 || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L || /* glibc up to and including 2.19: */ _BSD_SOURCE DESCRIPCION 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. VALOR DEVUELTO En caso de exito se devuelve cero. En caso de error se devuelve -1, y errno se configura para indicar el error. ERRORES Depediendo del sistema de ficheros, se pueden devolver otros errores. Los errores mas comunes para chdir() se listan a continuacion: EACCES Search permission is denied for one of the components of path. (See also path_resolution(7).) EFAULT path apunta fuera de su espacio de direcciones accesible. EIO Ocurrio un error de E/S. ELOOP Se han encontrado demasiados enlaces simbolicos al resolver path. ENAMETOOLONG path es demasiado largo. ENOENT The directory specified in path does not exist. ENOMEM No hay disponible suficiente memoria del nucleo. ENOTDIR Un componente del camino path no es un directorio. Los errores mas comunes para fchdir() se muestran a continuacion: EACCES Se ha denegado el permiso de busqueda sobre el directorio abierto en fd. EBADF fd no es un descriptor de archivo valido. ENOTDIR fd does not refer to a directory. ESTANDARES POSIX.1-2008. HISTORIAL POSIX.1-2001, SVr4, 4.4BSD. NOTAS 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). VEASE TAMBIEN chroot(2), getcwd(3), path_resolution(7) TRADUCCION La traduccion al espanol de esta pagina del manual fue creada por Miguel Angel Sepulveda , Juan Piernas y Miguel Perez Ibars Esta traduccion es documentacion libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. Si encuentra algun error en la traduccion de esta pagina del manual, envie un correo electronico a . Paginas de manual de Linux 6.06 31 Octubre 2023 chdir(2)