(006) MV of Linux commands

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.