How portable is mktemp(1)?
问题 As the title suggests — can I be reasonably sure that mktemp will exist on any unix-y operating system I'm likely to encounter? 回答1: POSIX does not seem to specify mktemp(1) . It looks like most modern systems have it, but the available functionality and the semantics of the options vary between implementations (so particular invocations may not be portable): mktemp(1) from OpenBSD — mktemp(1) originated in OpenBSD 2.1 mktemp(1) from FreeBSD mktemp(1) from Mac OS X — almost always the same as