mv does two jobs that feel different but are the same operation underneath: renaming a file and moving it to another directory. In both cases the data is not copied — only the path entry changes, which is why mv on a huge file finishes instantly.

Rename #

Rename a file and a directory
$ mv draft.txt notes.txt
$ mv old-project archived-project

Move #

Move files into a directory
$ mv notes.txt ~/Documents/
$ mv a.txt b.txt c.txt ~/Documents/
$ mv *.log ~/Documents/logs/

The destination must be a directory when you pass multiple sources — a mistake here is how files end up overwriting each other. Keeping the trailing slash on the target (~/Documents/) makes the intent unambiguous.

Overwrite behaviour #

FlagBehaviour
(none)Silently overwrite an existing destination
-iAsk before overwriting
-nNever overwrite
-bOverwrite, but keep a file~ backup
-vPrint each operation

Rename many files at once #

mv moves one name at a time, so bulk renames usually pair it with a loop:

Rename .jpeg files to .jpg
$ for f in *.jpeg; do mv -v "$f" "${f%.jpeg}.jpg"; done

The ${f%.jpeg} expansion strips the old suffix — the shell does the string work, mv does the rename.

Because mv never duplicates data, it is also the right tool for relocating things on the same disk in an instant. Across filesystems it quietly falls back to a copy-plus-delete, which is where cp and rm semantics apply. To look at what you are about to move, ls first. More in the journal.