711 B
711 B
mktemp
Create a temporary file or directory. Note that examples here all assume
$TMPDIRis unset. More information: https://www.gnu.org/software/autogen/mktemp.html.
- Create an empty temporary file in
/tmp/and print its absolute path:
mktemp
- Create a temporary directory in
/tmp/and print its absolute path:
mktemp --directory
- Create an empty temporary file at the specified path, with
Xs replaced with random alphanumeric characters, and print its path:
mktemp "{{path/to/file_XXXXX_name}}"
- Create an empty temporary file in
/tmp/with the specified name, withXs replaced with random alphanumeric characters, and print its path:
mktemp -t "{{file_XXXXX_name}}"