title: How to create a script which will automatically delete files from external disk which doesn't exist on the main volume
body: <p>So first use Carbon copy cloner to clone my Mac contents to a 500GB disk. After that I use <code>rsync</code> to backup new files which was created on the main volume of my Mac. Well <code>rsync</code> can be useful for transferring edited and new files only. But <code>rsync</code> does not include changes such as if I move <code>~/f</code> to <code>~/folder/f</code> <code>rsync</code> copies the file to the folder on my external disk but does not delete the file from the external disk that is <code>/Volumes/HDD/~/f</code>. So can someone help me around with a bash script to help me achieve this?
  Thanks!
  By the way my Mac's bash version is 3.2.57.</p>