Advanced · Organize files
dirname: Get the parent directory path
Syntax
dirname pathExamples
dirname /var/log/app.logUsage and sandbox support
The path does not need to actually exist.
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 pathrsyncSynchronize directories and filesgitManage code versionsmktempCreate a temporary file or directorytruncateAdjust 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