Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are several ways to upload local files to the Linux server?

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail what are the methods of uploading local files to the Linux server, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Common use: scp command, xftp program in xshell software, U disk mount, server's own lrzsz program.

1. Instructions for using scp:

1. Transfer the local files to the destination server:

Scp get66.pcap root@192.168.1.147:/super

Note: to copy the native get66.pcap to the super directory of 147server, the password of 147is required.

2. Execute scp on the local machine, and copy the remote server files to the local machine:

Scp root@192.168.1.147:/super/dns.pcap /

Note: execute scp on the local machine and copy the dns.pcap file of the remote server to the root directory of the local machine.

3. Copy all files in the directory:

Scp-r / super/ root@192.168.1.145:/

Note: copy all the files in the / super/ directory to the root directory of the 145server

Second, the xftp program in xshell software:

Xshell this software is very good, highly recommended!

There is a xftp plug-in, which can support files in the notebook and the server to transfer each other, this plug-in needs to be downloaded separately on the Internet, directly Baidu search xftp, very convenient.

1. Click the xftp icon on the xshell software (provided that xftp has been downloaded)

2. Then you can send files to each other.

3. Mounting the USB flash drive

The file is on the flash drive, so it's easy to do. Plug it directly into the server, then mount it, and then copy the files on the flash drive to the server.

1. Execute fdisk-l to view:

Fdisk-l

Note: after plugging in the flash drive, fdisk-l checks the server to recognize, / dev/sdc is my flash drive, 16g

2. Mount to a custom directory:

Mkdir / upan

Create a new directory

Mount / dev/sdc1 / upan/

Mount the flash drive to the newly created directory

Cd / upan/ls

You can see all the files on the flash drive.

3. Copy the files to the server home

Cp autorun.inf / home/

Copy the autorun.inf from the flash drive to the server's home directory

4. Uninstall the USB disk

After the file is copied to the server, it is recommended to execute the command manually, and then unplug the U disk to prevent the U disk from being damaged!

Cd / umount / dev/sdc1

All right, unplug the flash drive (follow the above, go back to the root directory first, and then execute the umount command, otherwise you will get an error indicating that the flash drive is in use and cannot be uninstalled)

4. The lrzsz program that comes with the server

Now most Linux servers come with lrzsz programs that make it easy to upload and download files. If not, you can download the rpm package directly and install it.

Lrzsz installation package link: http://down.51cto.com/data/2322755

1. Rz (upload from notebook to server)

Rz

Select the file on the notebook to transfer to the server

2. Sz (copy the files on the server to the notebook)

Sz test.tar

Copy the server's test.tar to the notebook.

On the local file upload to the Linux server what are several ways to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report