diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-02-28 13:30:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-28 15:30:49 +0100 |
commit | 2dea887e8fe43438cd5005820515fc21a1e4521c (patch) | |
tree | 529024bed1f7bd6cb6e3bdc82484e0bfb87f5841 /Base/usr/share/man/man1/mktemp.md | |
parent | c940fd6b7d641b5ec57df2642925c679b7e0034f (diff) | |
download | serenity-2dea887e8fe43438cd5005820515fc21a1e4521c.zip |
Base: Add mktemp(1) man page
Diffstat (limited to 'Base/usr/share/man/man1/mktemp.md')
-rw-r--r-- | Base/usr/share/man/man1/mktemp.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Base/usr/share/man/man1/mktemp.md b/Base/usr/share/man/man1/mktemp.md new file mode 100644 index 0000000000..2d4840256e --- /dev/null +++ b/Base/usr/share/man/man1/mktemp.md @@ -0,0 +1,34 @@ +## Name + +mktemp - create a temporary file or directory + +## Synopsis + +```**sh +$ mktemp [--directory] [--dry-run] [--quiet] [--tmpdir DIR] [template] +``` + +## Description + +`mktemp` creates temporary a file or directory safely, and then prints its name. + +A template may be specified and will be used instead of the default tmp.XXXXXXXXXX +as long as it contains at least 3 consecutive 'X's. + +## Options + +* `-d`, `--directory`: Create a temporary directory instead of a file +* `-u`, `--dry-run`: Do not create anything, just print a unique name +* `-q`, `--quiet`: Do not print diagnostics about file/directory creation failure +* `-p`, `--tmpdir`: Create temporary files relative to this directory + +## Examples + +```sh +# Create a temporary file +$ mktemp +# Find an available temporary file name +$ mktemp -u +# Create a temporary directory with a custom template +$ mktemp -d serenity.XXXXX +``` |