1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/mktemp.md

17 lines
386 B
Markdown
Raw Normal View History

2017-05-26 10:28:13 +01:00
# mktemp
> Create a temporary file or directory.
2022-03-17 03:02:09 +10:00
> More information: <https://ss64.com/osx/mktemp.html>.
2017-05-26 10:28:13 +01:00
2022-01-26 15:22:54 -08: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 15:22:54 -08: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 15:22:54 -08:00
`mktemp --suffix "{{.ext}}"`
2017-05-26 10:28:13 +01:00
2022-03-17 03:02:09 +10:00
- Create a temporary directory and print the absolute path to it:
2017-05-26 10:28:13 +01:00
2022-01-26 15:22:54 -08:00
`mktemp -d`