Server Fault is a question and answer site for system and network administrators. 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'm using rsync to move one directory to another. Is there some way to get rsync to incrementally delete a file from the sender after it has copied it to the reciever?

share|improve this question
up vote 17 down vote accepted

(answering my own question here :) )

The --remove-source-files will do this. :)

share|improve this answer
Thank you. By this option files just delete. How to delete directories with file deletion? – shgnInc Jan 11 '15 at 6:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.