File: link.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 (145 lines) | stat: -rw-r--r-- 4,526 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
.\" 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 Fri Jul 23 22:01:51 1993 Rik Faith <faith@cs.unc.edu>
.\" Modified Sun Aug 21 18:18:14 1994: Michael Haardt's NFS diffs were
.\"          applied by hand <faith@cs.unc.edu>
.\" Translated 25 Feb 1998 by Vicente Pastor Gómez <VPASTORG@santandersupernet.com , vicpastor@hotmail.com>
.\" Traslation revised 21 April 1998 by Juan Piernas <piernas@dif.um.es>
.\" Traslation revised Mon Aug 17 1998 by Juan Piernas <piernas@ditec.um.es>
.\"
.TH LINK 2 "10 diciembre 1997" "Linux 2.0.30" "Manual del Programador de Linux"
.SH NOMBRE
link \- crea un nuevo nombre para un fichero
.SH SINOPSIS
.B #include <unistd.h>
.sp
.BI "int link(const char *" oldpath ", const char *" newpath );
.SH DESCRIPCIÓN
.B link
crea un nuevo enlace (también conocido como enlace físico) a un fichero
existente.

Si
.I newpath
existe,
.I no
será sobreescrito.

Este nuevo nombre podrá ser usado exactamente igual que el viejo para cualquier
operación; ambos nombres se refieren al mismo fichero (y por lo tanto, tienen
los mismos permisos y propietario) y es imposible decir qué nombre era el
`original'.
.SH "VALOR DEVUELTO"
Si hubo éxito, se devuelve cero. Si hubo error, se devuelve \-1, y
.I errno
se actualiza apropiadamente.
.SH ERRORES
.TP
.B EXDEV
.IR oldpath " y " newpath
no están en el mismo sistema de ficheros.
.TP
.B EPERM
El sistema de ficheros que contiene
.IR oldpath " y " newpath
no soporta la creación de enlaces físicos.
.TP
.B EFAULT
.IR oldpath " o " newpath " apunta fuera de tu espacio de direcciones
accesibles.
.TP
.B EACCES
El acceso de escritura al directorio que contiene
.I newpath
no está permitido para el uid efectivo del proceso, o uno de los directorios en
.IR oldpath " o " newpath
no da permiso de búsqueda (ejecución).
.TP
.B ENAMETOOLONG
.IR oldpath " o " newpath " es demasiado largo."
.TP
.B ENOENT
Un componente del directorio en
.IR oldpath " o " newpath
no existe o es un enlace simbólico colgado.
.TP
.B ENOTDIR
Un componente usado como directorio en
.IR oldpath " o " newpath
no es, de hecho, un directorio.
.TP
.B ENOMEM
Memoria de núcleo insuficiente.
.TP
.B EROFS
El fichero está en un sistema de ficheros de sólo lectura.
.TP
.B EEXIST
.I newpath
ya existe.
.TP
.B EMLINK
El fichero a que se refiere
.I oldpath
ya tiene el número máximo de enlaces a él.
.TP
.B ELOOP
Se han encontrado demasiados enlaces simbólicos al resolver
.IR oldpath " o " newpath .
.TP
.B ENOSPC
El dispositivo que contiene el fichero no tiene espacio para la nueva entrada
de directorio.
.TP
.B EPERM
.I oldpath
es un directorio.
.TP
.B EIO
Se ha producido un error de E/S.
.SH OBSERVACIONES
Los enlaces físicos, tal y como los crea
.BR link ,
no pueden cruzar sistemas de ficheros. Utiliza
.B symlink
si esto es necesario.
.SH "CONFORME A"
SVr4, SVID, POSIX, BSD 4.3 y X/OPEN. SVr4 documenta las condiciones de error
adicionales ENOLINK y EMULTIHOP; POSIX.1 no documenta ELOOP.
X/OPEN no documenta EFAULT, ENOMEM ni EIO.
.SH FALLOS
En sistemas de ficheros NFS, el valor devuelto podría ser incorrecto en
caso de que el servidor NFS lance la creación del enlace y muera antes de
poder terminarlo. Utiliza
.BR stat (2)
para averiguar si se creó el enlace.
.SH "VÉASE TAMBIÉN"
.BR symlink (2),
.BR unlink (2),
.BR rename (2),
.BR open (2),
.BR stat (2),
.BR ln (1)