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