mv [Command]
|Command mv
Renames files and directories or move them from one directory to another.
Syntax
mv [options] source destination
Options
-b creates backup copies of files that are moved or renamed.
-f remove existing files without confirmation.
-i asks for confirmation before overwriting existing files.
-v displays the name of the file before moving.
Description
The mv command renames a file or moves it to another directory. Command works with regular files and directories with. Thus, by using mv sample sample.old you can rename the file in the sample sample.old. With on the other hand, with the command mv /tmp/sample /usr/local/sample you can move the sample file in the directory /tmp/ to directory /usr/local/.
Examples
mv oldfilename newfilename
to change the file name