Linux mv Command Builder (Move & Rename Files)
The mv command is used to move or rename files and directories in Linux. This interactive mv Command Builder helps you generate precise move commands with the right options.
🚀 What is the mv Command?
The mv command allows you to:
- Move files and directories
- Rename files and directories
- Handle existing files (overwrite, backup, skip)
- Move across filesystems
- Create backups before overwriting
⚙️ Basic Syntax
mv [options] SOURCE DESTINATION
mv [options] SOURCE1 SOURCE2 ... DESTDIR🧠 How to Use This mv Command Builder
This tool helps you:
- Select source file(s) or directory
- Specify destination or new name
- Choose options (interactive, force, no-clobber)
- Generate a ready-to-use mv command
Workflow
- Specify source file or directory
- Specify destination or new name
- Choose safety options (interactive, backup)
- Copy generated command
🔧 Common mv Usage Patterns
Rename a File
mv oldname.txt newname.txtMove File to Directory
mv file.txt /path/to/directory/Move Directory
mv source_dir dest_dirMove with Interactive Confirmation
mv -i source.txt destination/Move Without Overwriting
mv -n source.txt destination.txtMove with Backup
mv -b source.txt destination.txtForce Move (Dangerous)
mv -f source.txt destination.txt⚠️ Important Notes
- Renaming vs Moving: Same command works for both
- Safety First: Always use
-iin scripts or when unsure - Backup: Use
-bto create backups of overwritten files - No Clobber: Use
-nto prevent accidental overwriting