≡ Menu

Linux / Unix rsync: Delete Source File After Transfer

  • Dan March 14, 2014, 6:33 am

    --delete-after will remove the destination files after the transfer, not the source files.

  • Jalal Hajigholamali September 15, 2012, 4:54 am

    Hi,
    Very nice article….
    thanks

  • Pankaj July 24, 2013, 6:13 am

    this is to delete source file what would be the command if we want to delete an old file from destination after rsync complete
    my scenario is
    rsync -e ‘ssh -p 22’ -Cavz user@remote_computer:/home/user/dbbackup /home/user/backup/
    but this command rsync new file but also keep the old file in my home/user//backup/
    I want to remove the old file just want newly copied file.

    Please help.

  • Matt August 8, 2013, 7:09 pm

    actually its called –remove-sent-files now i think? Well my version was anyway

  • Bharat March 10, 2014, 8:18 am

    Please explain something about differential backup in rsync.

  • shgn January 11, 2015, 5:59 am

    Thank you. How to delete directory from source after sync beside –remove-source-files?

  • Tyee Cambron May 26, 2015, 2:02 am

    Wait, what is the -options perimeter for??? I don’t understand, because i didn’t see it in the ‘man rsync’ command on my macbook.

    • Andrew July 11, 2015, 11:11 am

      Tyee Cambron, the “-options” perimeter is not an actual perimeter. The author has added that in to show that that is where you put your options, such as avz. So “-options” would be replaced by “-avz”

  • Security: Are you a robot or human?

    Leave a Comment

    You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">