mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-27 20:53:34 +00:00
Update cheatsheets
This commit is contained in:
29
mktemp
Normal file
29
mktemp
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# mktemp
|
||||
|
||||
> Create a temporary file or directory.
|
||||
> More information: <https://man.openbsd.org/mktemp.1>.
|
||||
|
||||
- Create an empty temporary file and print its absolute path:
|
||||
|
||||
`mktemp`
|
||||
|
||||
- Use a custom directory if `$TMPDIR` is not set (the default is platform-dependent, but usually `/tmp`):
|
||||
|
||||
`mktemp -p {{/path/to/tempdir}}`
|
||||
|
||||
- Use a custom path template (`X`s are replaced with random alphanumeric characters):
|
||||
|
||||
`mktemp {{/tmp/example.XXXXXXXX}}`
|
||||
|
||||
- Use a custom file name template:
|
||||
|
||||
`mktemp -t {{example.XXXXXXXX}}`
|
||||
|
||||
- Create an empty temporary directory and print its absolute path:
|
||||
|
||||
`mktemp -d`
|
||||
Reference in New Issue
Block a user