Advanced · Organize files
mktemp:Create a temporary file or directory
Syntax
mktemp [-d] [template]Options
-d- Create directory
Examples
mktemp -d /tmp/work.XXXXXXUsage and sandbox support
The template ends with at least three X, and the parent directory must exist; the file permissions are 600, and the directory permissions are 700. Tutorial names are generated sequentially, real systems use random names.
Hands-on exercises
Related commands
mkdirCreate directorytouchCreate empty filecpCopy a file or directorymvMove or renamermDelete a file or directoryrmdirDelete empty directoriesfileDetermine file typestatView file propertiesbasenameGet the name at the end of the pathdirnameGet the parent directory pathrsyncSynchronize directories and filesgitManage code versionstruncateAdjust file lengthinstallCopy and set installation permissionsrenameBatch rename based on expressionddCopy data in chunkssyncFlush file system cachesha256sumGenerate or inspect SHA-256 digestmd5sumGenerate or inspect MD5 digestcksumCalculate CRC check valuebase64Encode or decode Base64