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
$TMPDIRis not set (the default is platform-dependent, but usually/tmp):
mktemp -p /
- Use a custom path template (
Xs are replaced with random alphanumeric characters):
mktemp
- Use a custom file name template:
mktemp -t
- Create an empty temporary directory and print its absolute path:
mktemp -d
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
