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

IE6 distortion problem

question: <input type="hidden" name=...

MySQL 8.0.20 installation and configuration tutorial under Win10

MySQL 8.0.20 installation and configuration super...

Docker Compose installation methods in different environments

1. Online installation Currently only tried the L...

Tutorial on installing Apache 2.4.41 on Windows 10

1. Apache 2.4.41 installation and configuration T...

How to configure MySQL scheduled tasks (EVENT events) in detail

Table of contents 1. What is an event? 2. Enable ...

React new version life cycle hook function and usage detailed explanation

Compared with the old life cycle Three hooks are ...

Installation tutorial of docker in linux

The Docker package is already included in the def...

How to use VirtualBox to build a local virtual machine environment on Mac

1. Big Data and Hadoop To study and learn about b...

Detailed steps and problem solving methods for installing MySQL 8.0.19 on Linux

I recently bought a Tencent Cloud server and buil...

Implementation of navigation bar and drop-down menu in CSS

1. CSS Navigation Bar (1) Function of the navigat...

WeChat applet tab left and right sliding switch function implementation code

Effect picture: 1. Introduction Your own applet n...

Example analysis of the principle and solution of MySQL sliding order problem

This article uses examples to explain the princip...

Detailed explanation of how to solve the problem of too long content in CSS

When we write CSS, we sometimes forget about the ...