chdir(2) | System Calls Manual | chdir(2) |
chdir, fchdir - cambia el directorio de trabajo
Biblioteca Estándar 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.
En caso de éxito se devuelve cero. En caso de error se devuelve -1, y errno se configura para indicar el error.
Depediendo del sistema de ficheros, se pueden devolver otros errores. Los errores más comunes para chdir() se listan a continuación:
Los errores más comunes para fchdir() se muestran a continuación:
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)
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 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.
5 Febrero 2023 | Páginas de manual de Linux 6.03 |