title: How to synchronize two folders in Bash?
body: <p>I am writing a short script. One functionality is synchronizing two folders. Now I have two variables with directories to two different folder: <code>DIRECTORY_1</code> and <code>DIRECTORY_2</code>. In both folders are files and other folders. I need to synchronize these folder to have all files in both folders. For example:</p>
  
  <ol>
  <li>In <code>DIRECTORY_1</code> I have file1, file2, file3 and folder1</li>
  <li><p>In <code>DIRECTORY_2</code> I have file4, file5, file6 and folder2</p></li>
  <li><p>I need comment after which I will have in both directories files1-6 and folders1-2.</p></li>
  </ol>
  
  <p>I was trying rsync command but it doesn't work properly.</p>