<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Archive on Michael’s Domain</title><link>https://jeltsch.org/en/tags/archive/</link><description>Recent content in Archive on Michael’s Domain</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright © 2002 - 2026 Michael Jeltsch.</copyright><lastBuildDate>Fri, 24 Jul 2026 00:18:18 +0300</lastBuildDate><atom:link href="https://jeltsch.org/en/tags/archive/index.xml" rel="self" type="application/rss+xml"/><item><title>Copying with rsync</title><link>https://jeltsch.org/en/copy_with_rsync/</link><pubDate>Mon, 17 Feb 2020 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/copy_with_rsync/</guid><description>&lt;p&gt;Reasons why you should (not always, but often) prefer rsync over cp:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Resume Interrupted Transfers
If you are copying a large file and your terminal session crashes or the power cuts out, cp will simply fail, and you have to start over. rsync can pick up right where it left off, which is a massive time-saver for large datasets.&lt;/li&gt;
&lt;li&gt;Efficiency (Delta-Transfer Algorithm)
rsync is designed to be smart. If you are copying a file that already exists at the destination (e.g., you are updating a backup), rsync only copies the parts of the file that have actually changed (the &amp;ldquo;delta&amp;rdquo;) rather than overwriting the entire file. cp, by contrast, always copies the whole file every single time.&lt;/li&gt;
&lt;li&gt;Real-time Progress Monitoring
rsync provides excellent visual feedback. By using the -P (or &amp;ndash;progress) flag, you get a real-time progress bar showing the percentage complete, transfer speed, and estimated time remaining. cp is famously silent, leaving you guessing whether the process is still running or has hung, requiring you to check at the destination via the size of the arriving file, whether anything is progressing (ls -lh filename, or du -hs filename)&lt;/li&gt;
&lt;li&gt;Seamless Remote Transfers
rsync is natively built to work over SSH. You can use it to copy files directly to or from a remote server as easily as copying files on your local machine. cp cannot do this; to use cp for a remote server, you would first need to mount the remote filesystem locally, which is far more complex and prone to errors.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is a common use case, the transfer of a directory, including all of its content:&lt;/p&gt;</description></item></channel></rss>