Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use rsync in the following manner:

rsync -Pvaz me@192.168.*.***:Documents/ /Users/me/Documents/
rsync -Pvaz /Users/me/Documents/ me@192.168.*.***:Documents/ 

The problem: if I delete a file on my home computer and sync, it doesn't get deleted on the remote computer. Is there a way to use rsync to literally sync two folders?

share|improve this question
This question tipped me how to sync my computer at home and my home directory in the office without bothering about server names etc. of my connection at home. Namely, just swap source and destination... – Dror Feb 8 '12 at 9:34
up vote 15 down vote accepted

Man page for rsync:

 --delete                delete extraneous files from dest dirs
 --delete-before         receiver deletes before transfer (default)
 --delete-during         receiver deletes during xfer, not before
 --delete-delay          find deletions during, delete after
 --delete-after          receiver deletes after transfer, not before
 --delete-excluded       also delete excluded files from dest dirs
share|improve this answer

I am not a rsync expert and there may be a switch that can do what you want and someone else may say.

However, personally, I use rsync when I need one way copying. When it comes to synchronise two locations, I use Unison which is built on top of Rsync and basically makes it easier.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .