Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Thank you @ErikF for pointing me out to that answer. I tried this code: rsync -zrvt --progress --backup --suffix=date +'.%F_%H-%M' /home/office1/Music/rsync-test1/target/ /home/office1/Music/rsync-test1/source but it did nothing. However, I added a figure to my question, so it becomes more clearer. Please see why the code didn't work? Commented Dec 31, 2017 at 5:02
  • Did you accidentally swap target and source? Also, I did some testing and found that the file in the destination is the one that's renamed, not the file from the source (for example updating 1.txt in the source will make it the new 1.txt, and the matching file in the destination becomes 1.txt.2017-12-30_22-22-50): this doesn't quite match what you were looking for in the original question, and actually wasn't what I had expected! Commented Dec 31, 2017 at 5:59
  • This code needs to be changed to make the incremental suffix value (as my example) - or just the time-stamp, as in the example code - to do that to the "copied source file" only, leaving the destination file intact. Thanks for your input! Commented Dec 31, 2017 at 6:42