mv - Move/Rename Files in Linux

From the Linux Essential Commands cheat sheet · File & Directory Operations · verified Jul 2026

mv - Move/Rename Files

Move or rename files and directories

bash
# Move files
mv source.txt /path/to/destination/

# Rename files
mv oldname.txt newname.txt

# Move multiple files
mv file1.txt file2.txt /target/dir/

# Move with confirmation
mv -i source.txt dest.txt
✅ Works for both moving and renaming files
💡 -i prompts before overwriting files
🔍 No -r needed for directories (unlike cp)
filesmoverenamebasic

More Linux tasks

Back to the full Linux Essential Commands cheat sheet