{"id":4420,"date":"2023-01-24T07:22:51","date_gmt":"2023-01-24T07:22:51","guid":{"rendered":"https:\/\/linuxsimply.com\/?p=4420"},"modified":"2024-01-14T11:59:47","modified_gmt":"2024-01-14T11:59:47","slug":"rsync-command-in-linux","status":"publish","type":"post","link":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/","title":{"rendered":"The \u201crsync\u201d Command in Linux [10 Practical Examples]"},"content":{"rendered":"<p style=\"text-align: justify;\">The <strong>rsync <\/strong>command in <strong>Linux <\/strong>is used to <strong>synchronize files <\/strong>and <strong>directories <\/strong>between two computers (<strong>local host<\/strong> and <strong>remote host<\/strong>). At first, it uses <strong>SSH(Secure Shell) <\/strong>to connect to a <strong>remote-host <\/strong>and decides which part of <strong>local files<\/strong> (or <strong>directories<\/strong>) is needed to be copied. The <strong>rsync <\/strong>command is an efficient way to transfer files as the manual method is tedious. In this article, I will show all the useful features of the <strong>rsync <\/strong>command in <strong>Linux <\/strong>with some practical examples.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#A_Description\" >A. Description<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#B_Syntax\" >B. Syntax<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#C_Options\" >C. Options<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#How_to_Set_Up_A_Server\" >How to Set Up A Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Install_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\" >Install the \u201crsync\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Practical_Examples_of_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\" >Practical Examples of the \u201crsync\u201d Command in Linux<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_1_Sync_Files_Locally_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\" >Example 1: Sync Files Locally Using the \u201crsync\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_2_Sync_a_Folder_With_A_Server\" >Example 2: Sync a Folder With A Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_3_Show_Progress_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\" >Example 3: Show Progress Using the \u201crsync\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_4_Ignore_Already_Existing_Files\" >Example 4: Ignore Already Existing Files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_5_Remove_Locally_Deleted_Files\" >Example 5: Remove Locally Deleted Files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_6_Automatically_Detele_Source_Files_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\" >Example 6: Automatically\u00a0 Detele Source Files Using the \u201crsync\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_7_Sync_with_Particular_File_Permission\" >Example 7: Sync with Particular File Permission<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_8_Perform_a_Dry_Run_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\" >Example 8: Perform a Dry Run Using the \u201crsync\u201d Command in Linux<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_9_Set_Maximum_File_Size\" >Example 9: Set Maximum File Size<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Example_10_Set_Bandwidth_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\" >Example 10: Set Bandwidth Using the \u201crsync\u201d Command in Linux<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"A_Description\"><\/span>A. Description<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The <strong>rsync <\/strong>command in <strong>Linux <\/strong>is a tool to transfer and <strong>synchronize <\/strong>efficiently. It is used in <strong>Unix-Like operating systems<\/strong>, licensed under <strong>GPL 3<\/strong> or later. <strong>Paul Mackerras<\/strong> and <strong>Andrew Tridgell <\/strong>published this command first in <strong>1996<\/strong>. Then it became part of most of the <strong>Linux distributions<\/strong> because of its speed and flexibility. The <strong>rsync <\/strong>command in <strong>Linux <\/strong>removed the need of sending all the data at once, which can be tricky for large amounts of data.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"B_Syntax\"><\/span>B. Syntax<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The syntax of the <strong>rsync <\/strong>command in <strong>Linux <\/strong>is quite simple. The syntax is <strong>rsync <\/strong>command followed by one or multiple options, then <strong>source <\/strong>and <strong>destination<\/strong>.<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">rsync [OPTION]... SOURCE DESTINATION<\/code><\/pre>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\"><strong>Note:<\/strong> In the above syntax <strong>OPTION <\/strong>enclosed by a <strong>square bracket<\/strong>, followed by <strong>three dots<\/strong>, represents that you can use multiple <strong>option<\/strong>s at once. The <strong>SOURCE <\/strong>denotes the path of the file or directory which will be copied\/synced. And <strong>DESTINATION <\/strong>denotes the path where the file or directory will be copied\/synced<\/div><\/div>\n<h3><span class=\"ez-toc-section\" id=\"C_Options\"><\/span>C. Options<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The <strong>rsync <\/strong>command in <strong>Linux <\/strong>comes with a lot of <strong>options<\/strong>. You can check them by coping the command below in <strong>Ubuntu Terminal<\/strong>:<\/p>\n<pre><code class=\"language-bash\" data-line=\"\">man rsync<\/code><\/pre>\n<p><span style=\"color: #800080;\"><strong>Useful Options<\/strong><\/span><\/p>\n<div class=\"su-list\" style=\"margin-left:20px\">\n<ul>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-a<\/strong>, copies <strong>attributes <\/strong>of data.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-h<\/strong>, shows data in a <strong>human-readable<\/strong><\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-v<\/strong>, enables <strong>verbose mode<\/strong>.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>-z<\/strong>, <strong>compresses <\/strong><\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;progress<\/strong>, shows <strong>progress report<\/strong>.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;ignore-existing<\/strong>, ignores already existing files in the <strong>server<\/strong>.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;delete<\/strong>, removes files from the <strong>server <\/strong>when they are deleted in the <strong>client<\/strong>.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;remove-source-files<\/strong>, automatically deletes files after syncing.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;chmod<\/strong>, sends file <strong>permissions<\/strong>.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;dry-run<\/strong>, performs a <strong>dry run<\/strong>.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;max-size<\/strong>, sets maximum file <strong>size<\/strong>.<\/li>\n<li><i class=\"sui sui-arrow-right\" style=\"color:#000000\"><\/i> <strong>&#8211;bwlimit<\/strong>, sets maximum <strong>bandwidth<\/strong>.<\/li>\n<\/ul>\n<\/div>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\"><strong>Note:<\/strong> The <strong>options <\/strong>in <strong>Linux <\/strong><a href=\"https:\/\/linuxsimply.com\/cli-in-linux\/\" target=\"_blank\" rel=\"noopener\"><strong>CLI<\/strong><\/a><strong>(Command Line Interface)<\/strong> are all <strong>case-sensitive.<\/strong> So be cautious while using them<\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Set_Up_A_Server\"><\/span>How to Set Up A Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">As I have mentioned earlier, to use the <strong>rsync <\/strong>command in <strong>Linux, <\/strong>you need a <strong>server computer<\/strong> and a <strong>client computer<\/strong>. I installed <strong>Ubuntu <\/strong>on <strong>WSL <\/strong>(<strong>Windows Subsystem for Linux<\/strong>) and I will use that as the <strong>client computer<\/strong>. The <strong>Terminal <\/strong>of the <strong>client computer <\/strong>goes like <strong>walid@Client<\/strong>. I also used <strong>Windows Terminal <\/strong>to customize the <strong>Terminal\u2019s <\/strong>appearance.<\/p>\n<p style=\"text-align: justify;\">I also installed <strong>Ubuntu <\/strong>in <strong>VMware Workstation Pro<\/strong> and I will use it as the <strong>server<\/strong>. The <strong>Terminal <\/strong>of the <strong>server <\/strong>goes like <strong>walid@Ubuntu<\/strong>. Now I will show how to turn it into an <strong>ssh server<\/strong>:<\/p>\n<ol>\n<li>Launch a <strong>Terminal <\/strong>in <strong>Ubuntu<\/strong>.<\/li>\n<li>Write the following command in the <strong>Terminal<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt-get install openssh-server<\/code><\/pre>\n<p>You will get an output like below. It will be completed in no time.<img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-4439 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19.png\" alt=\"Installing &quot;openssh-server&quot; package\" width=\"700\" height=\"471\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19-300x202.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19-1024x689.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19-767x516.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19-1536x1034.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19-2048x1378.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19-223x150.png 223w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19-100x67.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19-520x350.png 520w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-19-788x530.png 788w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/li>\n<li>Now, copy the following two commands in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">sudo service ssh start\nsudo service ssh status<\/code><\/pre>\n<p>If you see \u201c<strong>active (running)<\/strong>\u201d in the output, then you have successfully turned your <strong>Ubuntu <\/strong>in a <strong>ssh server<\/strong>.<img decoding=\"async\" class=\"aligncenter wp-image-4440 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20.png\" alt=\"Checking ssh server status\" width=\"700\" height=\"470\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20-300x201.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20-1024x688.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20-767x515.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20-1536x1031.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20-2048x1375.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20-223x150.png 223w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20-100x67.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20-521x350.png 521w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-20-788x529.png 788w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/li>\n<li>To find the <strong>IP address <\/strong>of your <strong>server<\/strong>, type the command below in the <strong>Terminal<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">ifconfig<\/code><\/pre>\n<p>I will see \u201c<strong>inet<\/strong>\u201d followed by your <strong>IP address<\/strong>. Choose the first one.<img decoding=\"async\" class=\"aligncenter wp-image-4441 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21.png\" alt=\"Finding IP address of the server\" width=\"825\" height=\"389\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21-300x141.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21-1024x483.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21-768x362.png 768w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21-1536x724.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21-2048x966.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21-318x150.png 318w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21-100x47.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21-742x350.png 742w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-21-788x371.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Install_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\"><\/span>Install the \u201crsync\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Installing the <strong>rsync <\/strong>command in <strong>Linux <\/strong>is a simple three steps process as mentioned below:<\/p>\n<ol>\n<li>At first, launch an <strong>Ubuntu Terminal<\/strong>.<\/li>\n<li>Copy the following command in the command prompt, press <strong>ENTER <\/strong>and provide a <strong>password <\/strong>(if necessary):\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt-get update<\/code><\/pre>\n<p>You will see an output like below. Wait for a little bit.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4445 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25.png\" alt=\"Updating Ubuntu\" width=\"825\" height=\"403\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25-300x147.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25-1024x500.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25-768x375.png 768w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25-1536x750.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25-2048x1000.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25-307x150.png 307w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25-100x49.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25-717x350.png 717w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-25-788x384.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\"><strong>Note:<\/strong> You may be able to install the <strong>rsync <\/strong>command in <strong>Linux <\/strong>without following <strong>Step 1<\/strong>. But it is a good practice<\/div><\/div><\/li>\n<li>Now, type the following command in the <strong>Terminal <\/strong>and hit <strong>ENTER<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">sudo apt-get install rsync<\/code><\/pre>\n<p>Your output will be like this. Wait for a while and the <strong>rsync <\/strong>command in <strong>Linux <\/strong>will be installed on your machine.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4446 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26.png\" alt=\"Installing the rsync command in Linux\" width=\"825\" height=\"403\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26-300x147.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26-1024x500.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26-768x375.png 768w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26-1536x750.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26-2048x1000.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26-307x150.png 307w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26-100x49.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26-717x350.png 717w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-26-788x384.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Practical_Examples_of_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\"><\/span>Practical Examples of the \u201crsync\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">In this section, I will show some basic usage of the <strong>rsync <\/strong>command in <strong>Linux<\/strong>. As you will see, I have used <strong>options <\/strong>\u201c<strong>a<\/strong>\u201d,\u201d<strong>h<\/strong>\u201d, \u201c<strong>v<\/strong>\u201d and \u201c<strong>z<\/strong>\u201d throughout these examples. It is not like the <strong>rsync <\/strong>command won\u2019t work without those <strong>options<\/strong>. But they will help the process run smoothly and help you understand it better. For instance, <strong>option \u201ca\u201d <\/strong>will preserve the <strong>attributes <\/strong>of the file or directory and <strong>option \u201cz\u201d<\/strong> will compress the file which will be useful for a slow internet connection. Moreover, <strong>options \u201ch\u201d<\/strong> and<strong> \u201cv\u201d<\/strong> show the process in a <strong>human-understandable format<\/strong>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_1_Sync_Files_Locally_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\"><\/span>Example 1: Sync Files Locally Using the \u201crsync\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Firstly, I will show you how to <strong>sync <\/strong>a file <strong>locally <\/strong>using the <strong>rsync <\/strong>command in <strong>Linux<\/strong>. In my <strong>home directory<\/strong>, there is a <strong>file <\/strong>and a <strong>folder<\/strong>. Now I want to copy\/sync the file to the folder. I can do that by the three steps below:<\/p>\n<ol>\n<li>At first open the <strong>Ubuntu Terminal<\/strong>.<\/li>\n<li>Type the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">rsync -ahvz file folder<\/code><\/pre>\n<\/li>\n<li>Now, press the <strong>ENTER<\/strong> button.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">At first, I used the \u201c<strong>ls<\/strong>\u201d command to show you the content of my<strong> home directory<\/strong>. Then I used the <strong>rsync <\/strong>command. Now you can see, there is a file named <strong>file <\/strong>in the folder named <strong>folder<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4421 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1.png\" alt=\"rsyncing file locally using the rsync command in Linux\" width=\"825\" height=\"363\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1-300x132.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1-1024x451.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1-766x337.png 766w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1-1536x676.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1-2048x901.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1-341x150.png 341w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1-100x44.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1-795x350.png 795w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-1-788x346.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<hr \/>\n<p><strong><span style=\"color: #000080;\"><span style=\"font-size: 18pt;\">Similar Readings<\/span><\/span><\/strong><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/iptables-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201ciptables\u201d Command in Linux [6 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/tcpdump-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201ctcpdump\u201d Command in Linux [6+ Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/nslookup-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cnslookup\u201d Command in Linux [12 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/ufw-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cufw\u201d Command in Linux [12+ Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"Example_2_Sync_a_Folder_With_A_Server\"><\/span>Example 2: Sync a Folder With A Server<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">In this example, I will work with my <strong>server<\/strong>. In the <strong>client computer<\/strong>, there is a <strong>folder <\/strong>containing <strong>five <\/strong>files. I want to sync those files to a remote <strong>server<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4422 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2.png\" alt=\"Listing contents of the folder\" width=\"599\" height=\"136\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2.png 599w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2-300x68.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2-1024x232.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2-766x174.png 766w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2-1536x349.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2-2048x465.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2-661x150.png 661w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2-100x23.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2-1542x350.png 1542w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-2-788x178.png 788w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/>Now do the following:<\/p>\n<ol>\n<li>Open a <strong>Terminal <\/strong>in your <strong>client computer<\/strong>.<\/li>\n<li>Insert the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">rsync -ahvz folder walid@192.168.235.129:~<\/code><\/pre>\n<div class=\"su-note\"  style=\"border-color:#cedfe2;\"><div class=\"su-note-inner su-u-clearfix su-u-trim\" style=\"background-color:#E8F9FC;border-color:#ffffff;color:#333333;\"><strong>Note:<\/strong> Here <strong>folder <\/strong>is the source and the <strong>home directory<\/strong> of the <strong>server <\/strong>is the destination. The <strong>tilde symbol <\/strong>(<strong>~<\/strong>) denotes <strong>home directory<\/strong>. Moreover, <strong>walid <\/strong>is the username whereas <strong>192.168.235.129 <\/strong>is the <strong>IP address <\/strong>of the <strong>server<\/strong><\/div><\/div><\/li>\n<li>Provide the <strong>password <\/strong>of the <strong>username<\/strong>.<\/li>\n<li>Press <strong>ENTER <\/strong>button from the keyboard.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">This image shows the output of the <strong>rsync <\/strong>command in <strong>Linux<\/strong>. If you don\u2019t enable the <strong>verbose mode <\/strong>(<strong>option<\/strong> <strong>\u201c-v\u201d<\/strong>), you won\u2019t see a detailed output like that.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4423 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3.png\" alt=\"Syncing a folder to a remote server using the rsync command in Linux\" width=\"1003\" height=\"443\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3.png 1003w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3-300x133.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3-1024x452.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3-768x339.png 768w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3-1536x678.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3-2048x905.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3-340x150.png 340w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3-100x44.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3-792x350.png 792w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-3-788x348.png 788w\" sizes=\"(max-width: 1003px) 100vw, 1003px\" \/>And, in the <strong>server<\/strong> there is the <strong>folder <\/strong>now, containing exactly the <strong>same files<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4424 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4.png\" alt=\"Viewing the folder in the server\" width=\"584\" height=\"102\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4.png 584w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4-300x52.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4-1024x179.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4-767x134.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4-1536x268.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4-2048x358.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4-859x150.png 859w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4-100x17.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4-2004x350.png 2004w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-4-788x137.png 788w\" sizes=\"(max-width: 584px) 100vw, 584px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_3_Show_Progress_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\"><\/span>Example 3: Show Progress Using the \u201crsync\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">If you are syncing a large amount of data, a progress report is necessary. Otherwise, you won\u2019t know whether the process is going properly. The <strong>rync <\/strong>command in <strong>Linux <\/strong>has an <strong>option \u201c&#8211;progress\u201d <\/strong>to show you the <strong>progress report<\/strong>. You do use that <strong>option <\/strong>by following the steps below:<\/p>\n<ol>\n<li>Press <strong>CTRL + ALT + T <\/strong>to open a <strong>Ubuntu Terminal <\/strong>in your client computer.<\/li>\n<li>Write the following command in that <strong>Terminal<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">rsync -ahvz --progress folder walid@192.168.235.129:~<\/code><\/pre>\n<\/li>\n<li>Press <strong>ENTER <\/strong>and provide a <strong>password<\/strong>.<\/li>\n<li>Hit <strong>ENTER <\/strong>again.<\/li>\n<\/ol>\n<p>As you can see, it is showing the progress of every step. <strong>100% <\/strong>means syncing is <strong>completed<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4425 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5.png\" alt=\"Showing progress of the rsync command in Linux\" width=\"825\" height=\"427\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5-300x155.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5-1024x530.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5-767x397.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5-1536x795.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5-2048x1060.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5-290x150.png 290w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5-100x52.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5-676x350.png 676w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-5-788x407.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_4_Ignore_Already_Existing_Files\"><\/span>Example 4: Ignore Already Existing Files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">In the <strong>folder <\/strong>directory of the <strong>client computer<\/strong>, there is a new file named <strong>newfile<\/strong>. I want to sync that folder to the <strong>server <\/strong>computer. However, I don\u2019t want to copy already existing files. You need the <strong>\u201c&#8211;ignore-existing\u201d option<\/strong> of the <strong>rsync <\/strong>command in <strong>Linux <\/strong>to do that. I also used the <strong>\u201c&#8211;progress\u201d option <\/strong>to show you what is really happening.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4426 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6.png\" alt=\"Showing the newfile in the folder\" width=\"700\" height=\"107\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6-300x46.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6-1024x157.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6-765x117.png 765w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6-1536x235.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6-2048x313.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6-981x150.png 981w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6-100x15.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-6-788x120.png 788w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/>To sync only <strong>new <\/strong>files (or directories), follow the steps below:<\/p>\n<ol>\n<li>At first, go to your <strong>client computer <\/strong>and open an <strong>Ubuntu Terminal<\/strong>.<\/li>\n<li>Copy the following command in the command prompt and press <strong>ENTER<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">rsync -ahvz --ignore-existing --progress folder walid@192.168.235.129:~<\/code><\/pre>\n<\/li>\n<li>Provide the <strong>password<\/strong> and hit <strong>ENTER <\/strong>again.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">In the output, as you can see, the <strong>rsync <\/strong>command is only copying the <strong>newfile<\/strong> as other files already exist in the <strong>server<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4427 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7.png\" alt=\"Ignoring existing file using the rsync command in Linux\" width=\"825\" height=\"192\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7-300x70.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7-1024x238.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7-765x178.png 765w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7-1536x357.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7-2048x477.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7-645x150.png 645w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7-100x23.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7-1504x350.png 1504w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-7-788x183.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_5_Remove_Locally_Deleted_Files\"><\/span>Example 5: Remove Locally Deleted Files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">If you remember <strong>Example 4<\/strong>, there is a directory name <strong>folder <\/strong>in the <strong>home<\/strong> <strong>directory <\/strong>of the <strong>client. <\/strong>Here I deleted the last three files. Now I want to sync the <strong>folder <\/strong>in a way that <strong>file4, file5 <\/strong>and <strong>newfile <\/strong>will be deleted in the <strong>server <\/strong>as well. The \u201c<strong>&#8211;delete<\/strong>\u201d <strong>option <\/strong>in the <strong>rsync <\/strong>command in <strong>Linux <\/strong>makes it possible.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4428 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8.png\" alt=\"Showing three files in the folder\" width=\"472\" height=\"111\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8.png 472w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8-300x71.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8-1024x241.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8-765x180.png 765w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8-1536x361.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8-2048x482.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8-638x150.png 638w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8-100x24.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8-1488x350.png 1488w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-8-788x185.png 788w\" sizes=\"(max-width: 472px) 100vw, 472px\" \/>Follow the steps below to remove locally deleted files:<\/p>\n<ol>\n<li>Lauch <strong>Ubuntu Terminal <\/strong>from <strong>client computer<\/strong>.<\/li>\n<li>Write the following command in the command prompt and hit <strong>ENTER<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">rsync -ahvz --delete folder walid@192.168.235.129<\/code><\/pre>\n<\/li>\n<li>Give the <strong>password<\/strong> and press <strong>ENTER <\/strong>again.<\/li>\n<\/ol>\n<p>This output is showing that the <strong>rsync <\/strong>command is <strong>deleting <\/strong>those three files from the <strong>server<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4430 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10.png\" alt=\"Deleting files using the rsync command in Linux\" width=\"825\" height=\"269\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10-300x98.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10-1024x334.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10-767x250.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10-1536x501.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10-2048x668.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10-460x150.png 460w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10-100x33.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10-1073x350.png 1073w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-10-788x256.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>Here I executed the command \u201c<strong>ls<\/strong>\u201d in the <strong>server<\/strong>. Now see, the <strong>server\u2019s<\/strong> <strong>folder <\/strong>is similar to the <strong>client<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4431 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11.png\" alt=\"Using &quot;ls&quot; command to view the folder in the server\" width=\"460\" height=\"96\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11.png 460w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11-300x63.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11-1024x214.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11-767x160.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11-1536x321.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11-2048x427.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11-719x150.png 719w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11-100x21.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11-1677x350.png 1677w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-11-788x164.png 788w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_6_Automatically_Detele_Source_Files_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\"><\/span>Example 6: Automatically\u00a0 Detele Source Files Using the \u201crsync\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">If you feel like you don\u2019t need the source data after syncing them with the <strong>server<\/strong>, then you can <strong>automatically delete <\/strong>them using the <strong>\u201c&#8211;remove-source-files\u201d option <\/strong>in the <strong>rsync <\/strong>command in <strong>Linux<\/strong>. Do the following:<\/p>\n<ol>\n<li>Open an <strong>Ubuntu Terminal <\/strong>by pressing <strong>CTRL + ALT + T<\/strong>.<\/li>\n<li>Insert the following command in the <strong>Terminal<\/strong> and press <strong>ENTER<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">rsync -ahvz --remvoe-source-files folder walid@192.168.235.129:~<\/code><\/pre>\n<\/li>\n<li>Provide the necessary <strong>credential <\/strong>and hit <strong>ENTER <\/strong>from your keyboard.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">I didn\u2019t get any warning or notification in the <strong>Terminal<\/strong> while my files are being <strong>deleted<\/strong>. But look, when I listed out the content of the <strong>folder <\/strong>directory, all the files are gone.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4432 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12.png\" alt=\"Automatically removing source files using the rsync command in Linux\" width=\"825\" height=\"296\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12-300x108.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12-1024x367.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12-766x275.png 766w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12-1536x551.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12-2048x735.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12-418x150.png 418w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12-100x36.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12-976x350.png 976w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-12-788x282.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_7_Sync_with_Particular_File_Permission\"><\/span>Example 7: Sync with Particular File Permission<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">In the image below, the file named <strong>file<\/strong> has no permission. However, I want to provide <strong>reading<\/strong>, <strong>writing <\/strong>and <strong>executing permissions <\/strong>to the <strong>owner <\/strong>of the <strong>server<\/strong>. You need to use the \u201c<strong>&#8211;chown<\/strong>\u201d <strong>option <\/strong>of the <strong>rsync <\/strong>command in <strong>Linux <\/strong>for that purpose.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4442 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22.png\" alt=\"Showing permission of the file in client computer\" width=\"700\" height=\"109\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22-300x47.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22-1024x159.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22-764x119.png 764w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22-1536x239.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22-2048x319.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22-963x150.png 963w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22-100x16.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-22-788x122.png 788w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/>Now do the following with me:<\/p>\n<ol>\n<li>Go to your <strong>Windows <\/strong>and launch an <strong>Ubuntu Terminal<\/strong>.<\/li>\n<li>Type the command below:\n<pre><code class=\"language-bash\" data-line=\"\">sudo rsync -ahvz --chmod=u=rwx file walid@192.168.235.129:~<\/code><\/pre>\n<\/li>\n<li>Provide <strong>password <\/strong>of the <strong>client computer<\/strong>.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Here I had to use \u201c<strong>sudo<\/strong>\u201d because only the <strong>root <\/strong>user has permission to access this file. I used \u201c<strong>chmod=u=rwx<\/strong>\u201d to give the <strong>owner(u)<\/strong> <strong>reading(r)<\/strong>, <strong>writing(w)<\/strong> and <strong>executing(x)<\/strong> <strong>permission<\/strong>. Any <strong>groups <\/strong>or <strong>others <\/strong>can\u2019t access the file.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4443 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23.png\" alt=\"Sending permission Using the rsync command in Linux\" width=\"825\" height=\"373\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23-300x136.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23-1024x463.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23-767x347.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23-1536x694.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23-2048x926.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23-332x150.png 332w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23-100x45.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23-774x350.png 774w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-23-788x356.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>Again, I used the <strong>\u201cls -l\u201d<\/strong> command to see the <strong>permissions <\/strong>of the <strong>file <\/strong>on the <strong>server<\/strong>. See, only the <strong>owner <\/strong>has permission now.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4444 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24.png\" alt=\"Viewing permission of the file in the server\" width=\"700\" height=\"96\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24-300x41.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24-1024x140.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24-766x105.png 766w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24-1536x211.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24-2048x281.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24-1094x150.png 1094w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24-100x14.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-24-788x108.png 788w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_8_Perform_a_Dry_Run_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\"><\/span>Example 8: Perform a Dry Run Using the \u201crsync\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Let\u2019s you have some sensitive data and want to copy them to a remote <strong>server<\/strong>. But before that, you want to check if everything is working fine. You are in luck because you can give a <strong>dry run<\/strong> using the <strong>option <\/strong>\u201c<strong>&#8211;dry-run<\/strong>\u201d in the <strong>rsync <\/strong>command in <strong>Linux<\/strong>. Now follow the proceedings below step by step:<\/p>\n<ol>\n<li>Open a <strong>Terminal <\/strong>in <strong>Ubuntu <\/strong>from your <strong>client computer<\/strong>.<\/li>\n<li>Write the following command in the command prompt:\n<pre><code class=\"language-bash\" data-line=\"\">rsync -ahvz --dry-run folder walid@192.168.235.129:~<\/code><\/pre>\n<\/li>\n<li>Press <strong>ENTER <\/strong>from your keyboard.<\/li>\n<li>Give the <strong>password <\/strong>for your corresponding <strong>username <\/strong>in the <strong>server <\/strong>and press <strong>ENTER <\/strong>again.<\/li>\n<\/ol>\n<p>The output looks like a normal output of the <strong>rsync <\/strong>command in <strong>Linux<\/strong> but nothing is happening in reality.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4434 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14.png\" alt=\"Dry run in the rsync command in Linux\" width=\"825\" height=\"326\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14-300x119.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14-1024x405.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14-767x303.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14-1536x607.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14-2048x809.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14-380x150.png 380w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14-100x40.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14-886x350.png 886w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-14-788x311.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>In the <strong>server<\/strong>, as you can see, the <strong>folder <\/strong>isn\u2019t copied and the <strong>home directory <\/strong>is empty.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4435 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15.png\" alt=\"Executing the &quot;ls&quot; command in the server\" width=\"358\" height=\"72\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15.png 358w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15-300x60.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15-1024x206.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15-766x154.png 766w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15-1536x309.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15-2048x412.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15-746x150.png 746w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15-100x20.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15-1740x350.png 1740w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-15-788x158.png 788w\" sizes=\"(max-width: 358px) 100vw, 358px\" \/><\/p>\n<hr \/>\n<p><strong><span style=\"color: #000080;\"><span style=\"font-size: 18pt;\">Similar Readings<\/span><\/span><\/strong><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><strong><a href=\"https:\/\/linuxsimply.com\/traceroute-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201ctraceroute\u201d Command in Linux [13 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/linuxsimply.com\/ssh-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cssh\u201d Command in Linux [18 Practical Examples]<\/a><\/strong><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><strong><a href=\"https:\/\/linuxsimply.com\/screen-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cscreen\u201d Command in Linux [13 Practical Examples]<\/a><\/strong><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><strong><a href=\"https:\/\/linuxsimply.com\/arp-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201carp\u201d Command in Linux [7 Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n<hr \/>\n<h3><span class=\"ez-toc-section\" id=\"Example_9_Set_Maximum_File_Size\"><\/span>Example 9: Set Maximum File Size<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">The <strong>\u201c&#8211;max-size\u201d option <\/strong>in the <strong>rsync <\/strong>command in <strong>Linux <\/strong>is used to <strong>limit file size<\/strong>. For instance, I have a big file in size named <strong>big_file <\/strong>in the <strong>folder <\/strong>directory of the <strong>client machine.<\/strong> And I want to limit syncing to <strong>500M<\/strong>. But the <strong>big_file <\/strong>is obviously bigger than <strong>500M<\/strong>. Now let\u2019s see what happens.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4436 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16.png\" alt=\"Showing the &quot;big_file&quot; in the local host\" width=\"700\" height=\"105\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16.png 700w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16-300x45.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16-1024x154.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16-767x115.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16-1536x230.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16-2048x307.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16-1000x150.png 1000w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16-100x15.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-16-788x118.png 788w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/>Follow the steps below with me:<\/p>\n<ol>\n<li>Launch an <strong>Ubuntu Terminal <\/strong>from the <strong>client machine<\/strong>.<\/li>\n<li>Copy the following command in the <strong>Terminal <\/strong>and hit <strong>ENTER<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">rsync -ahvz --max-size=\u2019500M\u2019 folder walid@192.168.235.129:~<\/code><\/pre>\n<\/li>\n<li>Write the necessary <strong>password<\/strong>.<\/li>\n<li>Find the <strong>ENTER <\/strong>button on your keyboard and press it.<\/li>\n<\/ol>\n<p>In this image, I showed you how to provide value for the <strong>\u201c&#8211;max-size\u201d option<\/strong>. However, if you limit your size to the range of <strong>bytes<\/strong>, it may generate an <strong>error<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4437 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17.png\" alt=\"Limiting maximum size in the rsync command in Linux\" width=\"825\" height=\"288\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17-300x105.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17-1024x357.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17-768x268.png 768w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17-1536x536.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17-2048x715.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17-430x150.png 430w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17-100x35.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17-1003x350.png 1003w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-17-788x275.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/>Now see, all the other files are copied except the <strong>big_file <\/strong>as it is bigger than <strong>500M<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4438 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18.png\" alt=\"Showing that the big file isn't copied to there server\" width=\"566\" height=\"105\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18.png 566w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18-300x56.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18-1024x190.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18-765x142.png 765w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18-1536x285.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18-2048x380.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18-809x150.png 809w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18-100x19.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18-1887x350.png 1887w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-18-788x146.png 788w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Example_10_Set_Bandwidth_Using_the_%E2%80%9Crsync%E2%80%9D_Command_in_Linux\"><\/span>Example 10: Set Bandwidth Using the \u201crsync\u201d Command in Linux<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: justify;\">Finally, I will end my examples by setting the <strong>bandwidth<\/strong>. It is useful for steady communication on a slow <strong>internet <\/strong>connection. I will use the <strong>option \u201c&#8211;bwlimit\u201d<\/strong> for that purpose and set the <strong>bandwidth <\/strong>to <strong>1MB\/s<\/strong>. In addition, I used the <strong>\u201c&#8211;progress\u201d<\/strong> option so that you can see the result. Now, do the following with me:<\/p>\n<ol>\n<li>Press <strong>CTRL + ALT + T <\/strong>to lauch an <strong>Ubuntu Terminal <\/strong>in the <strong>client <\/strong>computer.<\/li>\n<li>Insert the command below in the <strong>Terminal <\/strong>and hit <strong>ENTER<\/strong>:\n<pre><code class=\"language-bash\" data-line=\"\">rsync -ahvz --bwlimit=1M --progress folder walid@192.168.235.129:~<\/code><\/pre>\n<\/li>\n<li>Give password and press <strong>ENTER <\/strong>again.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">Here, I provided the <strong>option \u201c&#8211;bwlimit\u201d<\/strong> value <strong>1M <\/strong>as I want to fix my bandwidth to <strong>1MB\/s<\/strong>. You can already see the result. The speed is <strong>1.00MB\/s<\/strong> now.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4433 size-full\" src=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13.png\" alt=\"Setting bandwith in the rsync command in Linux\" width=\"825\" height=\"142\" srcset=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13.png 825w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13-300x52.png 300w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13-1024x176.png 1024w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13-767x132.png 767w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13-1536x264.png 1536w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13-2048x353.png 2048w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13-871x150.png 871w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13-100x17.png 100w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13-2033x350.png 2033w, https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-13-788x135.png 788w\" sizes=\"(max-width: 825px) 100vw, 825px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify;\">If you are interested in <strong>networking<\/strong>, then the <strong>rsync <\/strong>command in <strong>Linux <\/strong>is a necessary tool. Moreover, you can set up an <strong>ssh server <\/strong>anytime, anywhere to copy or sync <strong>files <\/strong>or <strong>directories<\/strong>. I hope all the examples above have helped to understand the <strong>rsync <\/strong>command in <strong>Linux<\/strong>.<\/p>\n<hr \/>\n<p><strong><span style=\"color: #000080;\"><span style=\"font-size: 18pt;\">Similar Readings<\/span><\/span><\/strong><\/p>\n<ul>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/wget-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cwget\u201d Command in Linux [14 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/ping-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cping\u201d Command in Linux [9 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/curl-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201ccurl\u201d Command in Linux [9 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/dig-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201c dig\u201d Command in Linux [10 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/hostname-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201chostname\u201d Command in Linux [12 Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/ip-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cip\u201d Command in Linux [9+ Practical Examples]<\/a><\/strong><\/li>\n<li><strong><a class=\"in-cell-link\" href=\"https:\/\/linuxsimply.com\/ifconfig-command-in-linux\/\" target=\"_blank\" rel=\"noopener\">The \u201cifconfig\u201d Command in Linux [6+ Practical Examples]<\/a><\/strong><\/li>\n<\/ul>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;4420&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;The \u201crsync\u201d Command in Linux [10 Practical Examples]&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">Rate this post<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>The rsync command in Linux is used to synchronize files and directories between two computers (local host and remote host). &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"The \u201crsync\u201d Command in Linux [10 Practical Examples]\" class=\"read-more button\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#more-4420\" aria-label=\"Read more about The \u201crsync\u201d Command in Linux [10 Practical Examples]\">Read more<\/a><\/p>\n","protected":false},"author":314893,"featured_media":4429,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[53],"class_list":["post-4420","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-commands","tag-networking-commands","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>The \u201crsync\u201d Command in Linux [10 Practical Examples]<\/title>\n<meta name=\"description\" content=\"The rsync command in Linux synchronizes files and directories locally or between a local host and remote host using SSH (Secure Shell).\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The \u201crsync\u201d Command in Linux [10 Practical Examples]\" \/>\n<meta property=\"og:description\" content=\"The rsync command in Linux synchronizes files and directories locally or between a local host and remote host using SSH (Secure Shell).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxsimply.com\/rsync-command-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxSimply\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/walid.alasad.5\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-24T07:22:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-14T11:59:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-9.png\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Walid Al Asad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Walid Al Asad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/\"},\"author\":{\"name\":\"Walid Al Asad\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/b54259fce1dc6e35d375984aff173ff0\"},\"headline\":\"The \u201crsync\u201d Command in Linux [10 Practical Examples]\",\"datePublished\":\"2023-01-24T07:22:51+00:00\",\"dateModified\":\"2024-01-14T11:59:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/\"},\"wordCount\":2266,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/rsync-command-in-linux-9.png\",\"keywords\":[\"networking commands\"],\"articleSection\":[\"Linux Commands\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/\",\"name\":\"The \u201crsync\u201d Command in Linux [10 Practical Examples]\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/rsync-command-in-linux-9.png\",\"datePublished\":\"2023-01-24T07:22:51+00:00\",\"dateModified\":\"2024-01-14T11:59:47+00:00\",\"description\":\"The rsync command in Linux synchronizes files and directories locally or between a local host and remote host using SSH (Secure Shell).\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/rsync-command-in-linux-9.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/rsync-command-in-linux-9.png\",\"width\":500,\"height\":500,\"caption\":\"Feature image of the rsync command in Linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/rsync-command-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxsimply.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The \u201crsync\u201d Command in Linux [10 Practical Examples]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#website\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"name\":\"LinuxSimply\",\"description\":\"All About Linux\",\"publisher\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxsimply.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#organization\",\"name\":\"LinuxSimply\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/LinuxSimply-New-Logo-Without-Icon.png\",\"width\":355,\"height\":48,\"caption\":\"LinuxSimply\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/#\\\/schema\\\/person\\\/b54259fce1dc6e35d375984aff173ff0\",\"name\":\"Walid Al Asad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Walid-Al-Asad-II-96x96.png\",\"url\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Walid-Al-Asad-II-96x96.png\",\"contentUrl\":\"https:\\\/\\\/linuxsimply.com\\\/wp-content\\\/uploads\\\/2023\\\/09\\\/Walid-Al-Asad-II-96x96.png\",\"caption\":\"Walid Al Asad\"},\"description\":\"Hello Everyone! I am Walid Al Asad. Currently, I am working at a tech company named Softeko as a Linux Content Developer Executive. I live in Dhaka, Bangladesh. I have completed my BSc. in Mechanical Engineering from Bangladesh University of Engineering and Technology (BUET). You can find me on LinkedIn, and ResearchGate. Read Full Bio\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/walid.alasad.5\",\"https:\\\/\\\/www.instagram.com\\\/alasadwalid\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/walid-al-asad\\\/\"],\"url\":\"https:\\\/\\\/linuxsimply.com\\\/author\\\/walid\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The \u201crsync\u201d Command in Linux [10 Practical Examples]","description":"The rsync command in Linux synchronizes files and directories locally or between a local host and remote host using SSH (Secure Shell).","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"The \u201crsync\u201d Command in Linux [10 Practical Examples]","og_description":"The rsync command in Linux synchronizes files and directories locally or between a local host and remote host using SSH (Secure Shell).","og_url":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/","og_site_name":"LinuxSimply","article_author":"https:\/\/www.facebook.com\/walid.alasad.5","article_published_time":"2023-01-24T07:22:51+00:00","article_modified_time":"2024-01-14T11:59:47+00:00","og_image":[{"width":500,"height":500,"url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-9.png","type":"image\/png"}],"author":"Walid Al Asad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Walid Al Asad","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#article","isPartOf":{"@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/"},"author":{"name":"Walid Al Asad","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/b54259fce1dc6e35d375984aff173ff0"},"headline":"The \u201crsync\u201d Command in Linux [10 Practical Examples]","datePublished":"2023-01-24T07:22:51+00:00","dateModified":"2024-01-14T11:59:47+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/"},"wordCount":2266,"commentCount":0,"publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"image":{"@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-9.png","keywords":["networking commands"],"articleSection":["Linux Commands"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxsimply.com\/rsync-command-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/","url":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/","name":"The \u201crsync\u201d Command in Linux [10 Practical Examples]","isPartOf":{"@id":"https:\/\/linuxsimply.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-9.png","datePublished":"2023-01-24T07:22:51+00:00","dateModified":"2024-01-14T11:59:47+00:00","description":"The rsync command in Linux synchronizes files and directories locally or between a local host and remote host using SSH (Secure Shell).","breadcrumb":{"@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxsimply.com\/rsync-command-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#primaryimage","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-9.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/01\/rsync-command-in-linux-9.png","width":500,"height":500,"caption":"Feature image of the rsync command in Linux"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxsimply.com\/rsync-command-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxsimply.com\/"},{"@type":"ListItem","position":2,"name":"The \u201crsync\u201d Command in Linux [10 Practical Examples]"}]},{"@type":"WebSite","@id":"https:\/\/linuxsimply.com\/#website","url":"https:\/\/linuxsimply.com\/","name":"LinuxSimply","description":"All About Linux","publisher":{"@id":"https:\/\/linuxsimply.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxsimply.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linuxsimply.com\/#organization","name":"LinuxSimply","url":"https:\/\/linuxsimply.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/LinuxSimply-New-Logo-Without-Icon.png","width":355,"height":48,"caption":"LinuxSimply"},"image":{"@id":"https:\/\/linuxsimply.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/linuxsimply.com\/#\/schema\/person\/b54259fce1dc6e35d375984aff173ff0","name":"Walid Al Asad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Walid-Al-Asad-II-96x96.png","url":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Walid-Al-Asad-II-96x96.png","contentUrl":"https:\/\/linuxsimply.com\/wp-content\/uploads\/2023\/09\/Walid-Al-Asad-II-96x96.png","caption":"Walid Al Asad"},"description":"Hello Everyone! I am Walid Al Asad. Currently, I am working at a tech company named Softeko as a Linux Content Developer Executive. I live in Dhaka, Bangladesh. I have completed my BSc. in Mechanical Engineering from Bangladesh University of Engineering and Technology (BUET). You can find me on LinkedIn, and ResearchGate. Read Full Bio","sameAs":["https:\/\/www.facebook.com\/walid.alasad.5","https:\/\/www.instagram.com\/alasadwalid\/","https:\/\/www.linkedin.com\/in\/walid-al-asad\/"],"url":"https:\/\/linuxsimply.com\/author\/walid\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/4420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/users\/314893"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/comments?post=4420"}],"version-history":[{"count":0,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/posts\/4420\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media\/4429"}],"wp:attachment":[{"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/media?parent=4420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/categories?post=4420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxsimply.com\/wp-json\/wp\/v2\/tags?post=4420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}