Jump to content
Science Forums

Cp -u option equivalent in scp


Recommended Posts

I guess if you know what scp exactly does, this is a stupid question, but I was wondering (actually I "need" it :-), there is always a workaround): is there an option with scp, that does the same as cp -u? I.e. which copies only the files if they are newer at the source (update)?

 

Thanks in advance.

Link to comment
Share on other sites

sanctus, honestly i dont remember there being one, otherwise, something this helpful would have been documented, but why would you want to use scp in this case, it seems that what you need to use is rsync which has options for the -u option and is made specifically for the task of file syncing, which you seem to be trying to do :phones:

Link to comment
Share on other sites

so rsync can also be used when copying between different machines? I never heard of rsync before...

 

And it is not really a syncronization I try to do, I make my runs on a cluster and the result files have similar names, so to not have to spell them out but use * and not copying to my machine every time stuff I already have, I was looking for the -u option... you see it is not THAT important, I can also just write out the names (in this case at least, I do not have hundreds of result files).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...