The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

mv - Move Files





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:

Examples:
$ 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

For more mv examples and explanations, you can refer to the provided link.