2017-05-26 10:28:13 +01:00
|
|
|
# mktemp
|
|
|
|
|
|
|
|
> Create a temporary file or directory.
|
2019-06-04 10:25:12 +01:00
|
|
|
> More information: <https://www.gnu.org/software/autogen/mktemp.html>.
|
2017-05-26 10:28:13 +01:00
|
|
|
|
2022-01-26 23:22:54 +00:00
|
|
|
- Create an empty temporary file and print the absolute path to it:
|
2017-05-26 10:28:13 +01:00
|
|
|
|
|
|
|
`mktemp`
|
|
|
|
|
2022-01-26 23:22:54 +00:00
|
|
|
- Create an empty temporary file with a given suffix and print the absolute path to file:
|
2017-05-26 10:28:13 +01:00
|
|
|
|
2022-01-26 23:22:54 +00:00
|
|
|
`mktemp --suffix "{{.ext}}"`
|
2017-05-26 10:28:13 +01:00
|
|
|
|
2022-01-26 23:22:54 +00:00
|
|
|
- Create a temporary directory and print the absolute path to it (non-portable long option: --directory):
|
2017-05-26 10:28:13 +01:00
|
|
|
|
2022-01-26 23:22:54 +00:00
|
|
|
`mktemp -d`
|