On Mon, 2010-06-07 at 11:58 -0300, Pablo Fredrikson wrote:
> Que tal, sin querer le hice unlink a un archivo (que no era un enlace
> simbolico) Y ME LO BORRO!?!?!

man unlink:
<snip>
unlink - call the unlink function to remove the specified file
</snip>

man 2 unlink:
<snip>
NAME
       unlink - delete a name and possibly the file it refers to

SYNOPSIS
       #include <unistd.h>

       int unlink(const char *pathname);

DESCRIPTION
       unlink()  deletes a name from the file system.  If that name was
the last link to a file and no processes have the file open the file is
deleted and the space it was using is made available for reuse.

       If the name was the last link to a file but any processes still
have the file open the file will remain in existence until the last file
descriptor referring to it is closed.

       If the name referred to a symbolic link the link is removed.

       If the name referred to a socket, fifo or device the name for it
is removed but processes which have the object open may continue to use
it.
</snip>

Qué esperabas que hiciera unlink? Borrar un link simbólico se hace con
rm.

-- 
CruX (aka Sebastián Cruz)
Jabber: crux @ lugmen . org . ar
Blog: http://blog.macumba.homelinux.org
GPG FP: 5D35 54C4 ABA7 DED9 133F 5272 04F7 13E3 B03D 64C4

Attachment: signature.asc
Description: This is a digitally signed message part

Responder a