Home  >  Article  >  Operation and Maintenance  >  File transfer includes not only FTP but also SCP, it’s really a show

File transfer includes not only FTP but also SCP, it’s really a show

咔咔
咔咔Original
2020-08-17 11:17:001728browse

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

Preface

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 command usage

#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
  • local_file: local file
  • remote_username: remote username
  • remote_ip: remote machine IP address
  • remote_folder Remote file

Creates a file locally, and then transfers the file to the virtual machineFile transfer includes not only FTP but also SCP, it’s really a showExecute the command: scp kaka.txt root@192.168.253.129:/File transfer includes not only FTP but also SCP, it’s really a showThen we can see the files we created locally on the virtual machineFile transfer includes not only FTP but also SCP, it’s really a show

File transfer includes not only FTP but also SCP, it’s really a show『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

File transfer includes not only FTP but also SCP, it’s really a showFile transfer includes not only FTP but also SCP, it’s really a show

#

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn