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

How to use the scp command on Linux system

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces the Linux system scp command how to use, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Scp is an abbreviation for secure copy, a command used to remotely copy files under Linux. Similar commands are cp, but cp is only copied locally, not across servers, and the scp transfer is encrypted.

1.1 Grammar

Scp (option) (Parameter) 11.2 option

Option description-1 using ssh protocol version 1, ipv4;-6 2, using ssh protocol version 2, using ipv4;-6, running in batch mode;-C using compression;-F, specifying ssh configuration files;-l, specifying broadband restrictions;-o, specifying ssh options used;-P, specifying the port number of the remote host;-p retaining the last modification time, last access time, and permission mode of the file. -Q does not show replication progress;-r replicates recursively. Show details

1.3 parameters

Source file: specifies the source file to copy.

Target file: target file. The format is user@host:filename (the file name is the name of the target file).

Listing 2.1 copies files to the local directory from a distance

Scp root@10.10.10.10:/opt/soft/nginx-0.5.38.tar.gz / opt/soft/-> single file scp-r root@10.10.10.10:/opt/soft/mongodb / opt/soft/-> Recursively copy files from the entire directory 122.2 upload local files to the specified directory on the remote machine

Scp / opt/soft/nginx-0.5.38.tar.gz root@10.10.10.10:/opt/soft/scptest-> single file scp-r / opt/soft/mongodb root@10.10.10.10:/opt/soft/scptest-> Recursively copy the files of the whole directory. Thank you for reading this article carefully. I hope the article "how to use scp commands in Linux system" shared by the editor will be helpful to you. At the same time, I also hope that you will support and pay attention to the industry information channel, and more related knowledge is waiting for you to learn!

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

Development

Wechat

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

12
Report