Commonly used · Organize files
rm: Delete files or directories
Syntax
rm [-rfR] path…Options
-r / -R- Recursively delete directories
-f- Ignore non-existent paths
Examples
rm downloads/old.tmpUsage and sandbox support
Check the path before deleting. The sandbox is resettable; real rm usually does not have a recycle bin.
Hands-on exercises
- Clean one-time downloadsEveryday
- Clean temporary files next to logsAdvanced
Related commands
mkdirCreate directorytouchCreate empty filecpCopy a file or directorymvMove or renamermdirDelete empty directoriesfileDetermine file typestatView file propertiesbasenameGet the name at the end of the pathdirnameGet the parent directory 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