Provided by: manpages-es-dev_4.18.1-1_all
NOMBRE
chdir, fchdir - cambia el directorio de trabajo
BIBLIOTECA
Biblioteca Estándar C (libc, -lc)
SINOPSIS
#include <unistd.h> int chdir(const char *path); int fchdir(int fd); Requisitos de Macros de Prueba de Características para glibc (véase 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
DESCRIPCIÓN
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 éxito 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 más comunes para chdir() se listan a continuación: 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 Ocurrió un error de E/S. ELOOP Se han encontrado demasiados enlaces simbólicos al resolver path. ENAMETOOLONG path es demasiado largo. ENOENT The directory specified in path does not exist. ENOMEM No hay disponible suficiente memoria del núcleo. ENOTDIR Un componente del camino path no es un directorio. Los errores más comunes para fchdir() se muestran a continuación: EACCES Se ha denegado el permiso de búsqueda sobre el directorio abierto en fd. EBADF fd no es un descriptor de archivo válido. ENOTDIR fd does not refer to a directory.
ESTÁNDARES
POSIX.1-2001, POSIX.1-2008, 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).
VÉASE TAMBIÉN
chroot(2), getcwd(3), path_resolution(7)
TRADUCCIÓN
La traducción al español de esta página del manual fue creada por Miguel Angel Sepulveda <angel@vivaldi.princeton.edu>, Juan Piernas <piernas@ditec.um.es> y Miguel Pérez Ibars <mpi79470@alu.um.es> Esta traducción es documentación libre; lea la GNU General Public License Version 3 ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩ o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a ⟨debian-l10n-spanish@lists.debian.org⟩.