[PATCH] Add coreutils/unlink.c
Isaac Dunham
ibid.ag at gmail.com
Sat Jun 21 23:06:09 UTC 2014
On Sun, Jun 22, 2014 at 12:24:53AM +0200, Xabier Oneca -- xOneca wrote:
> What's wrong/different with 'rm'? Just curious... Didn't know unlink
> existed as a command.
Not much, unless you really don't like options. ;)
The main rationale is down below, but for the most part, it's just that
you know exactly what unlink does: unlink(argv[1]).
No need to worry about whether someone did something malicious like
"touch ./'-fr *'", or whether you left an unescaped space before the *, or...
it will only delete one file.
> > I wrote this because (a) it's POSIX and (b) I occasionally use unlink,
> > and I saw a patch in the alpine aports tree converting unlink to rm.
> >
HTH,
Isaac Dunham
More information about the busybox
mailing list