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

How to implement Nginx configuration detection service status

1. Check whether the check status module is insta...

MySQL 8.0.17 installation and simple configuration tutorial under macOS

If you don’t understand what I wrote, there may b...

Detailed explanation of Nginx log customization and enabling log buffer

Preface If you want to count the source of websit...

Detailed explanation of the use of grid properties in CSS

Grid layout Attributes added to the parent elemen...

How to export and import .sql files under Linux command

This article describes how to export and import ....

MySQL query method with multiple conditions

mysql query with multiple conditions Environment:...

Two problems encountered when deploying rabbitmq with Docker

1. Background The following two problems are enco...

Various methods to implement the prompt function of text box in html

You can use the attribute in HTML5 <input="...

Cause Analysis and Solution of I/O Error When Deleting MySQL Table

Problem phenomenon I recently used sysbench to te...

Simple analysis of EffectList in React

Table of contents EffectList Collection EffectLis...

Detailed analysis and testing of SSD performance issues in MySQL servers

【question】 We have an HP server. When the SSD wri...

HTML realizes hotel screening function through form

<!doctype html> <html xmlns="http:/...

Vue implements the magnifying glass function of the product details page

This article shares the specific code of Vue to i...

CSS style to center the HTML tag in the browser

CSS style: Copy code The code is as follows: <s...