.\" -*- 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 "30 Marzo 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE chdir, fchdir \- cambia el directorio de trabajo .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .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 Requisitos de Macros de Prueba de Características para glibc (véase \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 DESCRIPCIÓN \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 "VALOR DEVUELTO" En caso de éxito se devuelve cero. En caso de error se devuelve \-1, y \fIerrno\fP se configura para indicar el error. .SH ERRORES Depediendo del sistema de ficheros, se pueden devolver otros errores. Los errores más comunes para \fBchdir\fP() se listan a continuación: .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 apunta fuera de su espacio de direcciones accesible. .TP \fBEIO\fP Ocurrió un error de E/S. .TP \fBELOOP\fP Se han encontrado demasiados enlaces simbólicos al resolver \fIpath\fP. .TP \fBENAMETOOLONG\fP \fIpath\fP es demasiado largo. .TP \fBENOENT\fP The directory specified in \fIpath\fP does not exist. .TP \fBENOMEM\fP No hay disponible suficiente memoria del núcleo. .TP \fBENOTDIR\fP Un componente del camino \fIpath\fP no es un directorio. .PP Los errores más comunes para \fBfchdir\fP() se muestran a continuación: .TP \fBEACCES\fP Se ha denegado el permiso de búsqueda sobre el directorio abierto en \fIfd\fP. .TP \fBEBADF\fP \fIfd\fP no es un descriptor de archivo válido. .TP \fBENOTDIR\fP \fIfd\fP does not refer to a directory. .SH ESTÁNDARES POSIX.1\-2008. .SH HISTORIAL POSIX.1\-2001, SVr4, 4.4BSD. .SH NOTAS 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 "VÉASE TAMBIÉN" \fBchroot\fP(2), \fBgetcwd\fP(3), \fBpath_resolution\fP(7) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Miguel Angel Sepulveda , Juan Piernas y Miguel Pérez Ibars . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .