The mv (move) command is used to move files. The basic usage is mv [options] [source1] [source2] [source n] destination, where if you are moving multiple sources, the destination should be a directory. If you are moving a single file within the same directory, the behavior of mv is similar to renaming the file.
The mv command also supports various options that provide additional functionality:
$ mv file /tmp ← Move the file "file" to the directory /tmp $ mv A B ←Rename the file "A" to "B" $ mv file1 file2 file3 dir1 ←Move files file1 to file3 to the directory dir1 $ mv directory /path/to/destination/ ← move directories |