.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" 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 "2 Agosto 2019" Linux "Manual del Programador de Linux" .SH NOMBRE chdir, fchdir \- cambia el directorio de trabajo .SH SINOPSIS \fB#include \fP .PP \fBint chdir(const char *\fP\fIpath\fP\fB);\fP .br \fBint fchdir(int \fP\fIfd\fP\fB);\fP .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBfchdir\fP(): .PD 0 .ad l .RS 4 .\" || _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 .RE .ad .PD .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 adecuadamente. .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 "CONFORME A" POSIX.1\-2001, POSIX.1\-2008, 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) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .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 .