This is not a bug, it is expected & reasonable behaviour. The `-p DIR' and `--tmpdir[=DIR]' mktemp(1) options are the same, excepting that the <DIR> argument is mandatory for -p and optional for --tmpdir. (See the manpage (`man mktemp') or try `mktemp --help'.) That is, the following are equivalent:
mktemp -u -p / --tmpdir mktemp -u -p/ --tmpdir mktemp -u --tmpdir=/ --tmpdir mktemp -u -p / -p "${TMPDIR:-/tmp}" All print "FOO/tmp.<random-stuff>" where <FOO> is the value of TMPDIR (/tmp if not set (the usual case)). Clearly, the LAST (right→most) -p or --tmpdir option is being used, with all the preceding ones ignored. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to coreutils in Ubuntu. https://bugs.launchpad.net/bugs/1822269 Title: mktemp does not handle -p option when --tmpdir option goes after -p option Status in coreutils package in Ubuntu: New Bug description: # This is correct. The printed temp file name is in folder / $ mktemp -u --tmpdir -p / /tmp.aFd4MwfGDU # after swapping the options, mktemp do not handle the -p option correctly. # swapping options should not affect the output. $ mktemp -u -p / --tmpdir /tmp/tmp.FkTPrEsTMs This should be a software bug, not relevant to any hardware. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1822269/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp