The mv command
Move or rename files and directories. Moves SOURCE to DEST. In the same directory that is a rename. If the last name is an existing directory, the files move inside it. Folders move without needing -r. An existing file at DEST is replaced without asking.
Usage
mv [OPTION]... SOURCE DEST mv [OPTION]... SOURCE... DIRECTORY
Options
| -v, --verbose | say what was moved |
|---|
Examples
mv draft.txt final.txtRename a filemv *.png images/Move files into a foldermv old-site archive/Move a whole folder
Learn it step by step
Related commands
learner@sandbox: ~bash (practice)
Note: Try mv here: your home directory has sample files. Press Try beside an example, or type your own.
Enter runs · Tab completes names · ↑ ↓ step through history · Ctrl+L clears · type help for every command
A practice shell in your browser that behaves like bash on Linux for these commands. Nothing you type leaves the page.