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?
Docker private image library Docker private image...
Table of contents 1. Basic use of axio 2. How to ...
Because of network isolation, MySQL cannot be ins...
Recently I saw a barrage effect on B station call...
When faced with a SQL statement that is not optim...
This article shares the installation and configur...
1. Make a repo file Refer to the official install...
Introduction: This article mainly introduces how ...
Recently, when I was using Linux to log in locall...
Introduction EXISTS is used to check whether a su...
Table of contents 1. Open source warehouse manage...
Install grafana. The official website provides an...
1. Form 1. The role of the form HTML forms are us...
Function currying (black question mark face)? ? ?...
Table of contents 1. Effect display 2. Enhanced v...