Most systems I\'ve encountered have both tempfile(1) and mktemp(1). There are syntactic differences, and mktemp can also create directorie
I suspect there's some interesting Unix lore behind this ...
The history of mktemp can be traced to OpenBSD 2.1. However, it became a part of GNU coreutils much later. This post announced the inclusion of mktemp for coreutils.
Until then, tempfile was being used by a number of programs. There was also a proposal to make tempfile a wrapper around mktemp, which was rejected to discourage use of tempfile.
However, the following was added to tempfile manual:
Exclusive creation is not guaranteed when creating files on NFS partitions.
tempfilecannot make temporary directories.tempfileis deprecated; you should usemktemp(1)instead.