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 realize the function of resuming File at breakpoint by Linux

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

What is a breakpoint continuation?

In the case of poor network conditions, for file transfer, we hope to be able to support the transfer of some data at a time. In fact, the breakpoint continuation is literally meant to continue the transmission at the disconnect point of the download, without having to start from scratch. So after understanding the core of the breakpoint continuation, I found that it is actually very simple, and the key lies in the grasp of the transmission breakpoint. I drew a simple diagram of my own understanding:

Linux breakpoint continuation file

When uploading and downloading files in the Linux system, it is easy to disconnect or transfer large files. How to continue the transfer after disconnection does not have to start over. Here we can use Linux's rsync.

instructions

File breakpoint download

Rsync-P-rsh=ssh root@192.168.0.11:/root/large.tar.gz / dounine/targe.tar.gz

File breakpoint upload

Rsync-P-rsh=ssh / dounine/targe.tar.gz root@192.168.0.11:/root/large.tar.gz

File directory breakpoint download

Rsync-P-rsh=ssh-r root@192.168.0.11:/root/storage / dounine

File directory breakpoint upload

Rsync-P-rsh=ssh-r / dounine root@192.168.0.11:/root/storage

Run in the background and put the above script in the shell file

Cat bg.sh

Rsync-P-rsh=ssh-r root@192.168.0.11:/root/storage / dounine &

Background operation

Chmod + x bg.shnohup. / bg.sh

Upload and download by ordinary way

Upload files

Scp / dounine/targe.tar.gz root@192.168.0.11:/root/large.tar.gz

Download a file

Scp root@192.168.0.11:/root/large.tar.gz / dounine/targe.tar.gz

Upload directory

Scp-r / dounine root@192.168.0.11:/root

Download directory

Scp-r root@192.168.0.11:/root/storage / dounine

Summary

The above is the whole content of this article, I hope that the content of this article has a certain reference and learning value for your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.

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