File: symlink.2

package info (click to toggle)
manpages-es 1.55-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,472 kB
  • ctags: 6
  • sloc: sh: 1,349; makefile: 63
file content (153 lines) | stat: -rw-r--r-- 4,867 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" This manpage is Copyright (C) 1992 Drew Eckhardt;
.\"                               1993 Michael Haardt, Ian Jackson.
.\"
.\" 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.
.\"
.\" Modified Sat Jul 24 12:01:10 1993 by Rik Faith
.\" Added correction due to Nick Duffek <nsd@bbc.com>, aeb, 960426
.\" Modified Wed Nov  6 04:07:10 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified Fri Jan 31 17:51:14 1997 by Eric S. Raymond <esr@thyrsus.com>
.\" Translated into Spanish Wed Feb 4 1998 by Gerardo Aburruzaga
.\" García <gerardo.aburruzaga@uca.es>
.\" Translation revised Mon Aug 17 1998 by Juan Piernas <piernas@ditec.um.es>
.\"
.TH SYMLINK 2 "21 agosto 1997" "Linux 2.0.30" "Manual del Programador de Linux"
.SH NOMBRE
symlink \- construye un nombre nuevo para un fichero
.SH SINOPSIS
.B #include <unistd.h>
.sp
.BI "int symlink(const char *" caminoviejo ", const char *" caminonuevo );
.SH DESCRIPCIÓN
.B symlink
crea un enlace simbólico llamado
.I caminonuevo
que contiene la cadena de caracteres
.IR caminoviejo .

A fin de encontrar un fichero o directorio, los enlaces simbólicos se
interpretan en tiempo de ejecución como si los contenidos del enlace
hubiesen sido sustituidos en el camino que se esté siguiendo.

Los enlaces simbólicos pueden contener como componentes del camino
.B ..
y, si se emplean al principio del enlace, se refieren a los
directorios padre de aquél en el que reside el enlace.

Un enlace simbólico (también conocido como enlace blando) puede
apuntar a un fichero existente o a uno que no existe; en este último
caso se conoce como un enlace colgante.

Los permisos de un enlace simbólico son irrelevantes; el propietario
no se tiene en cuenta cuando se sigue el enlace, pero sí se comprueba
cuando se quiere borrar o renombrar el enlace y éste está en un
directorio con el bit pegajoso (STIcky) activado.

Si
.I caminonuevo
existe,
.I no
será sobreescrito.
.SH "VALOR DEVUELTO"
En caso de éxito, se devuelve 0. En caso de error, se devuelve \-1 y
se pone en
.I errno
un valor apropiado.
.SH ERRORES
.TP
.B EPERM
El sistema de ficheros que contiene 
.IR caminonuevo
no admite la creación de enlaces simbólicos.
.TP
.B EFAULT
.I caminoviejo 
o
.I caminonuevo 
apuntan afuera de su espacio de direcciones accesible.
.TP
.B EACCES
No se permite acceso de escritura en el directorio que contiene
.I caminonuevo
para el UID efectivo del proceso, o uno de los directorios de
.IR caminonuevo
no permite búsqueda (permiso de ejecución, x).
.TP
.B ENAMETOOLONG
.IR caminoviejo " o " caminonuevo " eran muy largos."
.TP
.B ENOENT
Un componente directorio en
.I caminonuevo
no existe o es un enlace simbólico colgante, o
.I caminoviejo
es la cadena vacía.
.TP
.B ENOTDIR
Un componente usado como directorio en
.IR caminonuevo
no es, de hecho, un directorio.
.TP
.B ENOMEM
No había bastante memoria del núcleo.
.TP
.B EROFS
.I caminonuevo
está en un sistema de ficheros de lectura exclusiva.
.TP
.B EEXIST
.I caminonuevo
ya existe.
.TP
.B ELOOP
Se encontraron demasiados enlaces simbólicos al resolver
.IR caminonuevo .
.TP
.B ENOSPC
El dispositivo que contiene al fichero no tiene sitio para la nueva
entrada de directorio.
.TP
.B EIO
Se ha producido un error de E/S.
.SH OBSERVACIONES
No se hace ninguna comprobación sobre \fIcaminoviejo\fP.

Borrar el nombre referenciado por un enlace simbólico borrará
realmente el fichero (a menos que también tenga otros enlaces
duros). Si no se desea este comportamiento, emplee
.BR link .
.SH "CONFORME A"
SVr4, SVID, POSIX, BSD 4.3, X/OPEN.  SVr4 documenta los códigos de error
adicionales EDQUOT y ENOSYS.
.SH FALLOS
Vea
.BR open (2)
con referencia a varios ficheros con el mismo nombre, y NFS.
.SH "VÉASE TAMBIÉN"
.BR readlink (2),
.BR link (2),
.BR unlink (2),
.BR rename (2),
.BR open (2),
.BR lstat (2),
.BR ln (1)