Linux command--MV

Source: Internet
Author: User

The MV command is an abbreviated form of move that allows you to move files and rename files! In the penetration test is often used to rename files, in the command execution vulnerability, we need to upload Webshell or NC tools such as, if the direct wget, it is likely to be anti-or killed, so we need to wget a text file or image file to the remote server, And then rename it by MV to restore the file!

Basic usage Syntax (move):

MV Source File Destination Directory
[Email protected]:~/eth10/eth10# lstest1 test.txt[email protected]:~/eth10/eth10# ls test1[email protected]:~/eth10/ eth10# mv Test.txt test1/[email protected]:~/eth10/eth10# lstest1[email protected]:~/eth10/eth10# ls test1/test.txt


Basic use Syntax (rename):

Files renamed with MV source files
[Email protected]:~/eth10/eth10# lstest1 test1.txt[email protected]:~/eth10/eth10# mv Test1.txt test.txt[email protected]:~/eth10/eth10# Lstest1 Test.txt


In addition, if there is a file with the same name, you need to add the-I parameter to remind whether to overwrite, otherwise the default is to replace the same name, reply y is replaced, reply n is to skip the file!

[Email protected]:~/eth10/eth10# lstest1.txt test.txt[email protected]:~/eth10/eth10# mv-i test1.txt test.txtmv: Overwrite ' Test.txt '? N

Second, we can use-B to rename a file that has the same name.

[Email protected]:~/eth10/eth10# lstest1.txt test.txt[email protected]:~/eth10/eth10# mv-b test1.txt test.txt[email protected]:~/eth10/eth10# Lstest.txt test.txt~


This article is from the "eth10" blog, make sure to keep this source http://eth10.blog.51cto.com/13143704/1957042

Linux command--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.