> >On Tue, 16 Jun 2009 20:31:54 +0200 Casper.Dik at sun.com wrote: >> I don't think so; it's in the manual page. > >> I'm the only person clever enough to realize that "mktemp -u" in OpenBSD >> and Solaris is the exact same function as --dryrun in GNU coreutils? > >> -u, --dry-run >> do not create anything; merely print a name (unsafe) > >not the same as solars mktemp(1) >subtle difference is if the creat/mkdir happens or not >and if it does -u does an unlink/rmdir > > -u Operate in unsafe mode. The temp file is > unlinked before mktemp exits. This is > slightly better than mktemp(3C), but still > introduces a race condition. Use of this > option is discouraged.
In GNU or ksh93? It's merely semantics, I think,; you can't make sure that a filename is unique other than creating it with O_EXCL so we need to unlink and we're certain that the file was unique at some point in time. I think they have the same "root" but someone didn't properly clone mktemp(). Casper