mkdir | Creates a new, empty directory (folder) at the path you specify. Use mkdir -p parent/child to create nested folders in one go, even if the parent doesn’t exist yet. |
touch | Creates a new, empty file if it doesn’t already exist. If the file exists, it doesn’t touch the content — it just updates the file’s “last modified” time. |
rmdir | Deletes a directory, but only if it’s completely empty. If it has files or folders inside, this command will fail — it’s a safety check against accidental deletion. |
rm | Deletes a single file permanently. There’s no recycle bin here — once deleted, it’s gone, so double-check the filename before running it. |
rm -r | Deletes a directory along with everything inside it (files and subfolders), recursively. This is more powerful than rmdir but also riskier since it removes non-empty folders too. |
cp | Copies a file or folder to a new location, leaving the original untouched. Use cp -r when copying a directory, so its contents come along with it. |
mv | Moves a file/folder to a different location, or renames it if you keep it in the same location but give it a new name. Unlike cp, no copy is left behind — the original path stops existing. |