Subject: Re: bug#15926: RFE: unlink command already uses 'unlink' call; make 'rm' use 'remove' call

From: Pádraig Brady <[email-masked]>
Date: Tue, 19 Nov 2013 12:15:25 +0000

tag 15926 notabug
close 15926
stop

On 11/19/2013 11:56 AM, Linda Walsh wrote:
> Since there is already an unlink command that corresponds to unlinking a file,
> but there seems to be no command corresponding to the POSIX
> remove command, it seems upgrading 'rm' to use the 'remove'
> POSIX call would be a beneficial move of all the recent POSIX
> changes.
> 
> So how about upgrading 'rm' to use the remove function so
> it would work on empty directories as well.

Well we have the -d option to rm to explicitly do that.
That's a fairly fundamental change that would have backwards compat issues.
POSIX is explicit in the handling of directories also:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html

thanks,
Pádraig.