mv
Program: mv
Moves or renames files.
Usage
mv [OPTION]... SOURCE... DEST
Description
Give SOURCE the new name DEST. If DEST is a directory, put every SOURCE into it.
Options in the simulator
13 more options of the real program, not in the simulator yet
Examples
mv Downloads/photo.jpg Pictures/
ls Pictures
cat.jpg photo.jpg mv Downloads/invoice.pdf Downloads/invoice-october.pdf
ls Downloads
invoice-october.pdf photo.jpg mkdir Downloads/invoices
mv Downloads/invoice-*.pdf Downloads/invoices/
ls Downloads/invoices
invoice-2026-08.pdf 'invoice-2026-10(1).pdf'
invoice-2026-09.pdf invoice-2026-10.pdf mv notes.txt todo.txt
mkdir old
mv todo.txt old/
ls old
todo.txt mv Documents/report.txt Documents/report-2026.txt
ls Documents
notes.txt report-2026.txt Where you learn it
Lessons
- Copying, moving and renaming Terminal start
- Copying, moving and renaming Terminal start
- Final scenario: tidying up Downloads Terminal start
- Create, copy, move Linux Basics, Module 2: Files and directories