Home > Article > Operation and Maintenance > File transfer includes not only FTP but also SCP, it’s really a show
❝The way to transfer files is generally to use FTP, which is fast and convenient. This article will tell you about a new method SCP
❞
File transfer FTP is our most common, but recently I learned that there is another This way SCP can directly transfer files to the remote location.
This method is also provided in the comment area. I would like to thank this celebrity named Nebula
.
Today I will introduce this method to you.
Every tool has a reason for its existence. It does not mean that with FTP we refuse to use other things or learn other new tools.
#SCP is based on copying files and directories between linux. Of course, you can directly copy files and directories from win. Transmission to remote, virtual machines, and transmission between remote and remote is possible, and it is also very convenient to use.
SCP has many parameters, and Kaka will not demonstrate them one by one. It is not necessary. Even after the demonstration, I forgot it a few days later. I will only write down a few practical ones. That's it.
This article will demonstrate two cases for you, one is to transfer files from the local to the virtual machine, and the other is to transfer the files from the virtual machine to the local. Remote and remote direct transmission is also possible, and the commands used are the same.
「Transfer from local to remote」
scp local_file remote_username@remote_ip:remote_folder
Creates a file locally, and then transfers the file to the virtual machineExecute the command: scp kaka.txt root@192.168.253.129:/
Then we can see the files we created locally on the virtual machine
『Transfer from remote to local』
Executescp root@192.168.253.129:/xnj.txt C:\Users\Administrator\Desktop
In fact Just swap the two remote and local addresses
#❝Persistence in learning, persistence in blogging, and persistence in sharing are the beliefs that Kaka has always upheld since his career. I hope that Kaka’s articles in Nuoda Internet can bring you a little bit of help .
❞
The above is the detailed content of File transfer includes not only FTP but also SCP, it’s really a show. For more information, please follow other related articles on the PHP Chinese website!