Kolam Ayer MakersLinux Foundations

Command: mv

Use

mv old-name.txt new-name.txt
mv ~/playground/draft.md ~/playground/final.md

What It Does

mv moves a directory entry from one path to another path.

That same operation covers both renaming and moving:

Examples

Rename in the same directory:

mv draft.md final.md

Move into another directory, keeping the name:

mv final.md ~/src/pages/

Watch Out

mv can overwrite a target. Use mv -i while learning if overwriting would be expensive.

Docs Pointers