Revision [1843]

This is an old revision of CommandMktemp made by DavidLee on 2012-06-11 15:08:05.

 

Command mktemp


This command is part of the posix extensions and needs to be imported to be available to the shell.
See Posix Commands

Name

mktemp create directoriy


Synopsis

mktemp [options]

Options


-d,-directoryCreates a directory instead of a file
-s,-suffix suffixoptional suffix used for temporary file
-tempdir directoryUses directory instead of $TMP
-p,-prefix prefixoptional prefix used for temporary file

Description


Creates a temporary file and outputs the full path name to stdout.
If -d is specified creates a directory instead of a file.
If -s is specified uses the supplied suffix otherwise no suffix is used.
If -p is specifies then prepends the supplied prefix otherwise "xmlsh" is used.

Note: an empty file is created not just a pathname. This is required to guarentee multiple calls to mktemp always return unique unused filenames.

Return Value

Returns 0 if the command executed successfully, 1 if there was an error.


Commands
CategoryCommands
CommandsPosix
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki