Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking to simulate what cp --backup=numbered does using scp or another network copy command.

Any suggestion?

share|improve this question

migrated from stackoverflow.com Oct 13 '12 at 1:30

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 1 down vote accepted

rsync has a -b flag which appears to do what you want, and has a -e ssh flag to enable encryption. This may be as close as you get.

share|improve this answer
    
Another possibility might be to install remotely a version system (perhaps git or svn) and access it thru ssh –  Basile Starynkevitch Oct 12 '12 at 18:35
    
Close enough but I don't get versioned backup copies of the destination file. I should have been more precise in the question, I'm looking for a cp --backup=numbered equivalent. –  Robert Kubrick Oct 12 '12 at 19:07
1  
Look at the --suffix=SUFFIX flag. You can probably get, if not numbered versions, at least dated versions with --suffix=.20121012 –  hymie Oct 12 '12 at 19:47

Your Answer

 
discard

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.