Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux command-- mv

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

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~

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report