mv Linux Command Cheatsheet




mv (move) Linux Command is used to move one or more file/directories from one place to another. This also used to rename files/directories

Syntax

mv [Option(s)] [source] [destination]

Options

OptionDescription
-iInteractively move
-fForce override destination

Example

Renaming a file

mv readme.txt readme-v2.txt

Moving file to user home folder

mv readme.txt ~/

Moving file to given destination directory

mv readme.txt /path/to/destination/


┬ęCopyright 2020 OneCompiler | Privacy Policy | Terms & Conditions