summaryrefslogtreecommitdiff
path: root/tempfile.1
diff options
context:
space:
mode:
authorClint Adams <schizo@debian.org>2007-11-12 11:16:06 -0500
committerClint Adams <schizo@debian.org>2007-11-12 11:16:06 -0500
commitaa2159e1a3eeb0c82bee22c54a8739d578639761 (patch)
treebbe91d547c94dcd209ebcc79f879b7496f9e699f /tempfile.1
parentc2a1c435ef5e7d590328802ce333de410ce40cb6 (diff)
downloaddebianutils-aa2159e1a3eeb0c82bee22c54a8739d578639761.tar.gz
import all changes from the bzr branch as a single changeset
Diffstat (limited to 'tempfile.1')
-rw-r--r--tempfile.119
1 files changed, 12 insertions, 7 deletions
diff --git a/tempfile.1 b/tempfile.1
index 904f4cd..69a9f36 100644
--- a/tempfile.1
+++ b/tempfile.1
@@ -1,8 +1,8 @@
.\" -*- nroff -*-
-.TH TEMPFILE 1 "20 December 2004" "Debian"
+.TH TEMPFILE 1 "3 June 2007" "Debian"
.SH NAME
tempfile \- create a temporary file in a safe manner
-.SH SYNOPSYS
+.SH SYNOPSIS
.B tempfile
[\-d DIR] [\-p STRING] [\-s STRING] [\-m MODE] [\-n FILE] [\-\-directory=DIR]
[\-\-prefix=STRING] [\-\-suffix=STRING] [\-\-mode=MODE] [\-\-name=FILE] [\-\-help] [\-\-version]
@@ -14,11 +14,12 @@ creates a temporary file in a safe manner. It uses
to choose the name and opens it with O_RDWR | O_CREAT | O_EXCL. The filename
is printed on standard output.
.PP
-The directory to place the file is searched for in the following order:
+The directory in which to create the file might be searched for in this
+order:
.IP a)
The directory specified by the environment variable
.BR TMPDIR ,
-if it is writable.
+if it exists.
.IP b)
The directory specified by the
.B --directory
@@ -26,6 +27,10 @@ argument, if given.
.IP c)
The directory
.IR /tmp .
+.PP
+See
+.BR tempnam (3)
+for the actual steps involved in directory selection.
.SH OPTIONS
.TP
.BI "-d, --directory " DIR
@@ -46,12 +51,12 @@ Use FILE for the name instead of
The options -d, -p, and -s are ignored if this option is given.
.TP
.B "--help"
-Print a usage message on standard output and exit succesfully.
+Print a usage message on standard output and exit successfully.
.TP
.B "--version"
-Print version information on standard output and exist succesfully.
+Print version information on standard output and exit successfully.
.SH RETURN VALUES
-An exit status of 0 means the temporary file was created succesfully.
+An exit status of 0 means the temporary file was created successfully.
Any other exit status indicates an error.
.SH BUGS
Exclusive creation is not guaranteed when creating files on NFS