Steps to transfer files and folders between two Linux servers

Steps to transfer files and folders between two Linux servers

Today I was dealing with the issue of migrating a project, and suddenly I found myself wondering how to move so many pictures. The first thing that came to my mind was to download them from this server first, and then upload them to another server. This method is indeed feasible, but it is too time-consuming. Today I will teach you how to quickly transfer files and folders between two servers.

Step 1: Open our remote connection tool and enter the account password to log in to the server, as shown in the figure:

Click the file to open or create a new session. Enter the host IP and account password for the new session. If you have already logged in, just click the icon with a + sign under the file.

Step 2: Find the file or folder you want to transfer:

There are so many pictures here, I will just pass one, we enter pwd, you can see the path of the picture is /home/helpteach/project/mallupload/

Step 3: Start transferring files:

Input: scp /home/helpteach/project/mallupload/1509681299449.png [email protected]:/home/test

Then press the Enter key to see that the file is being transferred. When the mouse flashes again, it means that the transfer is complete. Let me break down the statement for you.

Copy folders (including the folder itself)

scp -r /home/helpteach/project/mallupload/ [email protected]:/home/test

Copy all files in the folder (excluding the folder itself)

scp /home/helpteach/project/mallupload/* [email protected]:/home/test

Copy the file and rename it

scp /home/helpteach/project/mallupload/1509681299449.png [email protected]:/home/test/test.png

/home/helpteach/project/mallupload/1509681299449.png: File to transfer

wasadmin: target server ssh account name

@ followed by the IP address of the target server

: Followed by: The directory where the files to be transferred to the target server are saved

The above are all the steps and knowledge points about transferring files and folders between two Linux servers. Thank you for your reading and support for 123WORDPRESS.COM.

You may also be interested in:
  • Detailed usage of Linux text search command find
  • Detailed explanation of Linux text processing command sort
  • One question to understand multiple parameters of sort command in Linux
  • How to count the number of specific characters in a file in Linux
  • Linux uses join -a1 to merge two files
  • How to deal with the prompt "Operation not permitted" when deleting files in Linux
  • Tips for viewing History records and adding timestamps in Linux
  • Several ways to run Python programs in the Linux background
  • Python uses paramiko to operate Linux
  • How to get the real path of the current script in Linux

<<:  Take you to a thorough understanding of the prototype object in JavaScript

>>:  MySQL5.7.03 Replacement of higher version to MySQL 5.7.17 Installation process and solutions to problems found

Recommend

Website Building Tutorial for Beginners: Learn to Build a Website in Ten Days

The 10-day tutorial uses the most understandable ...

How to remove the dotted border when clicking a link in FireFox

I encountered several browser compatibility issue...

Detailed explanation of how to use several timers in CocosCreator

1. setTimeOut Print abc after 3 seconds. Execute ...

Let's talk about MySQL joint query in detail

Table of contents Union query 1. Query the ID and...

WeChat applet implements simple calculator function

This article shares the specific code for the WeC...

4 ways to optimize MySQL queries for millions of data

Table of contents 1. The reason why the limit is ...

Record a pitfall of MySQL update statement update

background Recently, I executed a DML statement d...

Implementation of Docker private library

Installing and deploying a private Docker Registr...

Mysql database index interview questions (basic programmer skills)

Table of contents introduction Indexing principle...

Comparison of CSS shadow effects: drop-Shadow and box-Shadow

Drop-shadow and box-shadow are both CSS propertie...

How to modify iTunes backup path under Windows

0. Preparation: • Close iTunes • Kill the service...

How to change the root user's password in MySQL

Method 1: Use the SET PASSWORD command mysql> ...