mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-20 11:01:50 +00:00
Update cheatsheets
This commit is contained in:
29
osx/mktemp
Normal file
29
osx/mktemp
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, osx]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# mktemp
|
||||
|
||||
> Create a temporary file or directory.
|
||||
> More information: <https://keith.github.io/xcode-man-pages/mktemp.1.html>.
|
||||
|
||||
- Create an empty temporary file and print its absolute path:
|
||||
|
||||
`mktemp`
|
||||
|
||||
- Use a custom directory (defaults to the output of `getconf DARWIN_USER_TEMP_DIR`, or `/tmp`):
|
||||
|
||||
`mktemp --tmpdir={{/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 prefix:
|
||||
|
||||
`mktemp -t {{example}}`
|
||||
|
||||
- Create an empty temporary directory and print its absolute path:
|
||||
|
||||
`mktemp --directory`
|
||||
Reference in New Issue
Block a user