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 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
