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: Pádraig Brady
Subject: Re: Enhancement Requests + Patch: Unlink to support multiple arguments
Date: Tue, 17 Nov 2015 20:57:14 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 17/11/15 20:37, Bob Proulx wrote:
> 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.

Good info thanks. Yes rm will not unlink() a dir.

>> 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'm not sure they do?
Note the rm and unlink man pages are merged in FreeBSD at least,
which might confuse things.

thanks,
Pádraig



reply via email to

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