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

Some methods to optimize query speed when MySQL processes massive data

In the actual projects I participated in, I found...

Use of SerialPort module in Node.js

Table of contents Purpose Module Installation Bas...

HTML fixed title column, title header table specific implementation code

Copy code The code is as follows: <!DOCTYPE ht...

How to change apt-get source in Ubuntu 18.04

When using apt-get to install, it will be very sl...

Ubuntu 18.04 disable/enable touchpad via command

In Ubuntu, you often encounter the situation wher...

express project file directory description and detailed function description

app.js: startup file, or entry file package.json:...

Using radial gradient in CSS to achieve card effect

A few days ago, a colleague received a points mal...

Some notes on mysql self-join deduplication

Let me briefly explain the functional scenario: T...

mysql group_concat method example to write group fields into one row

This article uses an example to describe how to u...

HTML weight loss Streamline HTML tags to create web pages

HTML 4 HTML (not XHTML), MIME type is text/html, ...

How to configure Nginx to support ipv6 under Linux system

1. Check whether the existing nginx supports ipv6...