Preface 1. scp usage The basic command of 1.1 Copy local files to the remote machine Example 1 scp -r ./test/ [email protected]:/home/ Example 2 scp -P 6666 -r ./test/ [email protected]:/home/ The -r parameter indicates whether to recursively copy the directory 1.2 Copy the remote machine file to the local Example: scp -r [email protected]:/home/test ./home/ The above means to put the remote machine's 1.3 Copy a remote file to another remote machine Example: scp -r [email protected]:/home/test [email protected]:/home/ The above means to put the remote machine's 2. Use sftpFirst, we open git or linux to connect to the server
Format sftp username@hostname For example, sftp [email protected] Next you will enter the sftp> Enter your sftp command 1.1 Copy local files to the remote machine Format: put localfile [remotefile] Example: put -r ./test /home The -r parameter indicates whether to copy recursively 1.2 Copy the remote machine file to the local Format get remotefile [localfile] Example get -r /home/test ./home 1.3 Create/delete remote directories Create a hello directory mkdir hello Delete the hello directory rmdir hello The sftp remote work environment defaults to the user directory, so the hello directory created above will be placed under The first cd /home mkdir hello The second type is mkdir /home/hello 3. What is the difference between scp and sftp? Which one is better? the difference Which one is better? <br /> If you need to operate files occasionally, use Okay, that’s all for now. SummarizeThis is the end of this article about the detailed usage of scp and sftp commands under Linux. For more relevant content about linux scp and sftp commands, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Html sample code for reading and displaying pictures in a local folder
>>: Do you know the meaning of special symbols in URL?
//MySQL statement SELECT * FROM `MyTable` WHERE `...
Compared with other large databases such as Oracl...
Table of contents Introduction Install Display Fi...
Table of contents Install Dependencies Install bo...
introduce Have you ever spent a whole day trying ...
This article example shares the specific code of ...
Today I will share with you a good-looking counte...
Achieve results Implementation Code html <div ...
Today I happened to be helping a friend move his ...
I encountered a requirement to customize shortcut...
1. Install Zabbix Agent to monitor the local mach...
1. Introduction tr is used to convert or delete a...
Preface Recently, I added two fields to a table i...
1. Download mysql-8.0.17-winx64 from the official...
I use Navicat as my database tool. Others are sim...