Fundamentals of the ten-year OPS series-Linux
Zeng Lin
Contact: [Email protected]
Website: www.jplatformx.com
Copyright: Please do not reprint the article without permission
First, Introduction
The function of the MV command is "remove" or "rename", depending on how the user operates. In both cases, the original file name will no longer exist after you complete the operation. The usage of MV is basically similar to the use of the CP command.
mv Item1 item2
Move (or rename) the file (or directory) item1 to item2, or
MV Item ... directory
Move one or more entries from one directory to another.
Second, command options
MV command A lot of options are shared with the CP command, in daily work generally only need to remember the following 3 can be. Specifically, the following table:
Options |
Meaning |
-I.--interactive |
Requires prompting the user for confirmation before overwriting an existing file. If this option is not specified, the MV will overwrite the file by default |
-U--update |
Move files (Note that this is a file instead of a directory) from one directory to another, moving only those files that do not exist in the destination directory or the files in the destination directory. |
-V--verbose |
Show informational messages when moving files |
(006) MV of Linux commands