Make
mkdir foo creates one directory. mkdir -p a/b/c creates the whole chain at once and silently succeeds if anything already exists — perfect for scripts. mkdir -m 700 secret sets the permissions atomically (we'll see chmod soon).
Empty-only remove
rmdir foo removes an empty directory. If the dir has anything inside, it refuses. That's the safety. Day-to-day, you almost always want rm -r instead — but rmdir is the right tool when you want the safety net.
Remove for real
rm file— delete one file. No trash, no undo.rm -i file— interactive, asks before each.rm -r dir/— recurse. Deletes everything.rm -f file— force. Doesn't complain if missing, doesn't ask about read-only.rm -rf dir/— the nuclear combo. Use carefully.
There is no Recycle Bin. rm means gone unless you have a backup. macOS has the trash command via Homebrew (brew install trash) which puts files in the GUI Trash for real undo.
Patterns to fear
rm -rf $VAR/* — if $VAR is empty, this becomes rm -rf /* on bash. Always quote: rm -rf "$VAR/"* and verify $VAR is set first. The Steam Linux installer once deleted users' homes because of this exact bug.