bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unlink


From: Dave Richards
Subject: Re: unlink
Date: Sat, 22 Oct 2005 08:14:03 -0400

Bob-
    Thanks for your thoughts on this issue.  The reason for using this
command (and teaching our support staff to use it) is not technical but
just to reduce 'human error' and for comfort level.

- Sometimes people perceive that 'rm' is deleting the file and not just
the symbolic link.  I get calls about that fairly often.  They think it
will delete both at the same time.

-  The other issue is that you know unlink will only get symbolic links
when doing copy and pastes which people do very quickly.  Sometimes you
get users that put in spaces in file names and then highlight and middle
mouse those files without putting quotes around them so 'rm' might blow
out things that they don't want to delete.  If you accidentally use
unlink on a real file, it won't do anything to it.  An error with "rm"
will do what you tell it :)

It's not a major issue, but really is helpful to me when I teach
non-Admins how to be careful with files.

Dave


On Fri, 2005-10-21 at 21:11 -0600, Bob Proulx wrote:

> Dave Richards wrote:
> > In using unlink (GNU coreutils) 5.3.0
> > 
> > I found that unlink doesn't support multiple files at once.  I know this
> > program isn't used that often, and I suspect that's why it was never
> > changed or upgraded.
> 
> The unlink command is really for compatibility with legacy unix
> systems that also provided that command.  It is one of those low level
> commands that has been available forever but has little use today.
> The traditional command did not allow multiple arguments either.
> 
> > I'm requesting please that support be added for multiple files.
> > 
> > unlink [file1] <file2> <file3> <file4>
> 
> Wouldn't it be more appropriate to use 'rm' in this situation?  Unlink
> is mainly useful when dealing with low level restitching of
> directories.  At one time it was not uncommon to try to trap
> applications in a directory by unlinking the ".." entry.  This was
> similar in concept to a chroot but less overhead and also a lower
> level of security.  The 'rm' command is not suitable for unlinking the
> ".." entry.  The actual ability to to do this rests with the
> capabilities provided by the filesystem.
> 
> Can you provide an example where it is advantageous to use unlink with
> multiple files?
> 
> Bob

Attachment: smiley-3.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]