mv(1)
NAME
mv − move or rename files and directories
SYNTAX
mv file1 file2
mv file... directory
DESCRIPTION
The mv command moves (changes the name of) file1 to file2.
If file2 already exists, it is removed before file1 is moved. If file2 has a mode which forbids writing, mv prints the mode and reads the standard input to obtain a line. If the line begins with y, the move takes place. If not, mv exits. For further information, see chmod(2).
In the second form, one or more files are moved to the directory with their original file-names.
The mv command refuses to move a file onto itself.
RESTRICTIONS
If file1 and file2 lie on different file systems, mv must copy the file and delete the original. In this case the owner name becomes that of the copying process and any linking relationship with other files is lost.
Like the rm command, mv should take the −f option to suppress the question if the target exists and is not writable.