Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Linux command-- mv

Shulou Source: shulou.com Published: 2022-06-01 07:14:05 09月25日 Update

The mv command is an abbreviation for move, which allows you to move and rename files! It is often used to rename files in * tests. In command execution vulnerabilities, we need to upload tools such as webshell or nc. If we directly wget, it is likely to be prevented or killed, so we need to first wget a text file or image file to a remote server, and then rename the file through mv to restore the file!

Basic use of syntax (mobile):

Mv source file destination directory root@kali:~/eth20/eth20# lstest1 test.txtroot@kali:~/eth20/eth20# lstest1root@kali:~/eth20/eth20# mv test.txt test1/root@kali:~/eth20/eth20# lstest1root@kali:~/eth20/eth20# lstest1 / test.txt

Basic syntax (rename):

File root@kali:~/eth20/eth20# lstest1 test1.txtroot@kali:~/eth20/eth20# mv test1.txt test.txtroot@kali:~/eth20/eth20# lstest1 test.txt after mv source file renaming

In addition, if there is a file with the same name, you need to add the-I parameter to remind you whether it needs to be overwritten, otherwise the file with the same name will be replaced by default, y is replaced, and n is skipped!

Root@kali:~/eth20/eth20# lstest1.txt test.txtroot@kali:~/eth20/eth20# mv-I test1.txt test.txtmv: whether to overwrite 'test.txt'? N

Secondly, we can use-b to add and rename files with the same name.

Root@kali:~/eth20/eth20# lstest1.txt test.txtroot@kali:~/eth20/eth20# mv-b test1.txt test.txtroot@kali:~/eth20/eth20# lstest.txt test.txt~

Tags: Files commands source files syntax movement constants parameters images tools forms text servers vulnerabilities directories targets abbreviations services tests Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Redmi MariaDB Apple MySQL