What’s the difference between tempfile and mktemp?

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. tempfile cannot make temporary directories. tempfile is deprecated; you should use mktemp(1) instead.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)