coreutils
[Top][All Lists]
Advanced

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

Re: Enhancement Requests + Patch: Unlink to support multiple arguments


From: Bob Proulx
Subject: Re: Enhancement Requests + Patch: Unlink to support multiple arguments
Date: Tue, 17 Nov 2015 13:37:27 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

Adam Brenner wrote:
> I have an enhancement requests and patch ready for unlink to support
> multiple arguments. Currently unlink does not accept more than one
> argument to remove a link. I have a patch that adds that
> functionality. For example:
> 
>     $ unlink link1 link2 link3

Why are you using unlink here instead of rm?  I think you are using
the wrong tool for the job.  Why even care if unlink can take multiple
arguments?

It used to be that unlink existed for tasks such as allowing the
superuser to unlink the ".." entry from a directory.  Which was one
additional layer in a chroot to prevent crawling out of it.  Which was
why the older documentation mentions needing sufficient privileges.
This unlinking of ".." isn't allowed anymore on recent file systems
and other container practices have appeared making this practice
obsolete.

> Is this something the community would like for me to submit?

I do not have a strong opinion.  Traditional Unix systems only allowed
one argument and no options.  *BSD now allows multiple arguments and
includes various options.  It would be nice to be compatible with *BSD.

I think the main reason why it doesn't matter that unlink can have
multiple arguments or not is that one should be using rm for this task
instead.  If one uses unlink and multiple arguments then they are
using the wrong tool.

Bob



reply via email to

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