mv
move, which is also renamemv moves things, and there is no separate rename command because renaming is moving to a new name in the same place. Within one filesystem it is instant whatever the size; across two, it copies the data and then deletes the original.
Inside one filesystem, mv changes only the name the data is filed under — the data itself never moves.
At the terminal
Read the session first, then the notes: each numbered line in the output is answered by the note with the same number.
What the numbered lines are telling you
The name is kept. mv calls it "renamed" because that is literally what happened to the path.
Same directory, different name. Nothing was copied.
archive/notes.txt already existed, so mv did nothing and said nothing. Without -n it would have replaced it.
The USB stick is a different filesystem, so the data really had to travel. This is the slow case, and the one that can fail halfway.
Switches
A switch changes how the command behaves. These are the ones used day to day; man mv lists the rest. Single-letter switches can usually be joined, so -l -a may be written -la.
-i- Interactive: ask before overwriting an existing file.
-n- No-clobber: never overwrite an existing file.
-u- Update: move only when the source is newer than the destination.
-f- Force: overwrite without asking, even if -i was set by an alias.
-v- Verbose: print each file as it is moved or renamed.
Variations worth knowing
The same tool, pointed at a narrower question. These four cover most of what it is reached for day to day.
mv -i *.log old/Moves several files into a directory, asking before any overwrite.
mv old-name/ new-name/Renames a directory — no recursive flag is needed.
mv -b config.yaml /etc/app/Keeps a backup of any file it would have overwritten, with a ~ on the end.
mv -- -odd-name.txt fixed.txtThe double dash ends the options, so a name starting with a dash is treated as a file.
In cybersecurity
mv has no undo and no warning when the destination exists, and it carries a file's old permissions to its new home.
Moving onto an existing name destroys what was there. -n in scripts and -i at the prompt are cheap insurance.
A file moved into a web root keeps the owner and mode it had before. Check them after the move, not before.
Writing a new version beside the old one and then mv-ing it over is the safe way to update a config: readers see the old file or the new, never half of each.