This is one of the good aspect of rsync. Additionally, you can use this too --delete-after.
--delete-after will remove the destination files after the transfer, not the source files.
Hi, Very nice article…. thanks
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.
actually its called –remove-sent-files now i think? Well my version was anyway
Please explain something about differential backup in rsync.
Thank you. How to delete directory from source after sync beside –remove-source-files?
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.
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”
Leave a Comment
Next FAQ: Linux / Unix sed: Delete Word From File / Input
Previous FAQ: WordPress Change Preview Post Link Button URL Via preview_post_link Filter
Don’t Miss Any Linux Tips
Get nixCraft in your inbox. It's free: