mktemp behaviour (coreutils vs. busybox)
Seb
sbb at tuxfamily.org
Wed Jun 16 21:09:17 UTC 2010
Le Wed, 16 Jun 2010 00:06:51 +0200
Robert <betulichergutmensch at googlemail.com> a écrit:
Hello,
> 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
Excuse me for the question, but why don't you specify directly the pattern:
$ mktemp /tmp/tmp.XXXXXX
or:
$ mktemp "${TMPDIR:-"/tmp"}/tmp.XXXXXX"
In this way you'd be sure of the result, wouldn't you ?
++
Seb.
More information about the busybox
mailing list