Linux--MV

Source: Internet
Author: User

1. Command format: MV [option] source file or directory destination file or directory

2, Command function: MV command to rename the file or move it to a new directory

3. Command parameters:

-B: Overwrite the previous backup if you need to overwrite the file

-F: Mandatory meaning, if the target file already exists, does not ask for direct overwrite

-I: If the target file already exists, ask whether to overwrite

-U: Update if the target file already exists and source is newer

-T: Specifies the target directory for MV, which is suitable for moving multiple source files to a directory, where the target directory is in front of the source file

4. Example

File renaming

MV Test.log Test1.txt

Moving files

MV Test.txt Test3

Move file Log1.txt log2.txt log3.txt to Test3

Mv-t log1.txt log2.txt log3.txt test3

Move Directory

MV Dir1 Dir2

Move all files under the current folder to the top level directory

MV *.. /

Linux--MV

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.