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
|
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" This manpage is Copyright (C) 1992 Drew Eckhardt;
.\" 1993 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 13:00:50 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Sun Sep 8 18:59:01 1996 by aeb following remarks by
.\" Arnt Gulbrandsen <agulbra@troll.no>
.\" Modified Fri Jan 31 23:49:15 1997 by Eric S. Raymond <esr@thyrsus.com>
.\" Translated Thu Jul 10 1997 by Nicols Lichtmaier <nick@debian.org>
.\" Updated Apr 23 by Nicols Lichtmaier <nick@debian.org>
.\"
.TH UNLINK 2 "21 de Agosto de 1997" "Linux 2.0.30" "Manual del Programador Linux"
.SH NOMBRE
unlink \- borra un nombre de fichero y posiblemente el fichero al que refiere
.SH SINOPSIS
.B #include <unistd.h>
.sp
.BI "int unlink(const char *" pathname );
.SH DESCRIPCIN
.B unlink
borra un nombre en el sistema de ficheros. Si el nombre era
el ltimo enlace a un fichero, y ningn proceso tiene abierto
al fichero, ste es borrado y el espacio que estaba usando
queda disponible para su reutilizacin.
Si el nombre era el ltimo enlace a un fichero, pero algn proceso
tiene todava ese fichero abierto, el fichero seguir existiendo
hasta que el ltimo descriptor de fichero asociado haya sido cerrado.
Si el nombre refera a un enlace simblico el enlace es removido.
Si el nombre refera a un zcalo, fifo or perifrico, el nombre
es removido pero los procesos que tengan abierto a ese objeto
pueden continuar utilizndolo.
.SH "VALOR REGRESADO"
En xito regresa cero. En error regresa \-1, y
.I errno
es asignada apropiadamente.
.SH ERRORES
.TP 0.8i
.B EFAULT
.IR pathname " apuntaba fuera de su espacio de direcciones accesible."
.TP
.B EACCES
El uid efectivo del proceso no tiene acceso de escritura al directorio
conteniendo
.IR pathname ,
o uno de los componentes directorio de
.IR pathname
no tiene permiso de bsqueda(ejecucin).
.TP
.B EPERM
El directorio conteniendo
.I pathname
tiene el ``sticky-bit''
.RB ( S_ISVTX )
puesto y el uid efectivo del proceso no es ni el uid del fichero a
borrar ni el del directorio que lo contiene, o
.I pathname
es un directorio.
.TP
.B ENAMETOOLONG
.I pathname
era demasiado largo.
.TP
.B ENOENT
Un componente directorio en
.I pathname
no existe o es un enlace simblico roto.
.TP
.B ENOTDIR
Un componente usado como directorio en
.I pathname
no es, de hecho, un directorio.
.TP
.B EISDIR
.I pathname
se refiere a un directorio.
.TP
.B ENOMEM
Insuficiente memoria de kernel disponible.
.TP
.B EROFS
.I pathname
se refiere a un fichero en un sistema de archivos de slo-lectura.
.TP
.B ELOOP
Se encontraron demasiados enlaces simblicos al intentar traducir
.IR pathname .
.TP
.B EIO
Ocurri un error de E/S.
.SH "CONFORMA CON"
SVr4, SVID, POSIX, X/OPEN, BSD 4.3. SVr4 documenta las condiciones de error
adicionales EBUSY, EINTR, EMULTIHOP, ETXTBUSY y ENOLINK.
.SH BUGS
Sinsabores en el protocolo NFS subyacente pueden cusar la desaparicin de
ficheros que todava se estn usando.
.SH "VASE TAMBIN"
.BR link "(2), " rename "(2), " open "(2), " rmdir (2),
.BR mknod "(2), " mkfifo "(3), " remove "(3), " rm (1).
|