mktemp behaviour (coreutils vs. busybox)

Denys Vlasenko vda.linux at
Fri Jun 18 01:20:20 UTC 2010

On Wednesday 16 June 2010 00:06, Robert wrote:
> Kind greetings from a new ML member ;-)
> Forgive me if I'm reviving an old topic but ML search did not reveal
> anything related to that topic. I wondered today whether the busybox
> mktemp(b) and the GNU coreutils mktemp(c) (b and c just as abbr.) have a
> different behaviour.
> mktemp(c) states the options -t and -p as deprecated and mktemp(b) only
> works like mktemp(c), when the option -t is specified.
> Example:
> $ mktemp(c)
> /tmp/tmp.8fM3VmH3PF
> $ mktemp(b)
> tmp.DqP4t2
> $ mktemp(b) -t
> /tmp/tmp.Amsp3O
> Is there any special intention about that difference? As coreutils
> states -t and -p as deprecated I would prefer to not writing scripts
> with the -t option (when that might lead to an error in the future).
> Would it be possible to change the default behaviour of mktemp(b) to use
> the absolute path of the /tmp/ folder like it is in coreutils?

You are right. Here is the fix:


More information about the busybox mailing list