OpenSolaris

Discussions Communities Projects Download Source Browser

Home » OpenSolaris Forums » documentation » discuss

Thread: scp no-clobber option??

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 4 - Last Post: Nov 11, 2009 9:40 AM by: rheilke Threads: [ Previous | Next ]
ethoms

Posts: 53
From: SG

Registered: 2/18/08
scp no-clobber option??
Posted: Nov 2, 2009 10:59 PM
To: OpenSolaris » discuss
Cc: OpenSolaris » help
Cc: Communities » documentation » discuss
Cc: Communities » sysadmin » discuss
  Click to reply to this thread Reply

Is there an option for no-clobber (does not overwrite existing files) in the command scp? "man scp" doesn' t reveal anything. I got one hit in google which indicated that there was but perhaps that was the GNU version of scp.

rheilke

Posts: 651
From: CA

Registered: 6/14/05
Re: [docs-discuss] scp no-clobber option??
Posted: Nov 10, 2009 3:08 PM   in response to: ethoms

  Click to reply to this thread Reply

Sorry, I've looked for something like this several times myself, but
never found anything.

What I tend to do now is scp everything to a new directory, and then mv
-i it to the final spot. Does nothing to conserve disk space or network
traffic, though...

Rainer

Euan Thoms wrote:
> Is there an option for no-clobber (does not overwrite existing files) in the command scp? "man scp" doesn' t reveal anything. I got one hit in google which indicated that there was but perhaps that was the GNU version of scp.

_______________________________________________
docs-discuss mailing list
docs-discuss at opensolaris dot org


alanm

Posts: 307
From: US

Registered: 5/1/08
Re: [docs-discuss] scp no-clobber option??
Posted: Nov 11, 2009 7:33 AM   in response to: rheilke

  Click to reply to this thread Reply

Does rsync do what you want (update only the modified files)?

-alan

Rainer Heilke wrote:
> Sorry, I've looked for something like this several times myself, but
> never found anything.
>
> What I tend to do now is scp everything to a new directory, and then
> mv -i it to the final spot. Does nothing to conserve disk space or
> network traffic, though...
>
> Rainer
>
> Euan Thoms wrote:
>> Is there an option for no-clobber (does not overwrite existing files)
>> in the command scp? "man scp" doesn' t reveal anything. I got one hit
>> in google which indicated that there was but perhaps that was the GNU
>> version of scp.
>
> _______________________________________________
> docs-discuss mailing list
> docs-discuss at opensolaris dot org
_______________________________________________
docs-discuss mailing list
docs-discuss at opensolaris dot org


elowe

Posts: 275
From: US

Registered: 3/9/05
Re: [docs-discuss] scp no-clobber option??
Posted: Nov 11, 2009 7:46 AM   in response to: alanm

  Click to reply to this thread Reply

It sounds like you want the semantics of rsync -a. See the rsync man page for instructions on using ssh as the transport, I have done this before and it works wonderfully.

- Eric



----- Original Message ----
From: alan mcclellan <Alan dot McClellan at Sun dot COM>
To: Rainer Heilke <rheilke at dragonhearth dot com>
Cc: docs-discuss at opensolaris dot org; Euan Thoms <euan at potensol dot com>
Sent: Wed, November 11, 2009 9:33:03 AM
Subject: Re: [docs-discuss] scp no-clobber option??

Does rsync do what you want (update only the modified files)?

-alan

Rainer Heilke wrote:
> Sorry, I've looked for something like this several times myself, but never found anything.
>
> What I tend to do now is scp everything to a new directory, and then mv -i it to the final spot. Does nothing to conserve disk space or network traffic, though...
>
> Rainer
>
> Euan Thoms wrote:
>> Is there an option for no-clobber (does not overwrite existing files) in the command scp? "man scp" doesn' t reveal anything. I got one hit in google which indicated that there was but perhaps that was the GNU version of scp.
>
> _______________________________________________
> docs-discuss mailing list
> docs-discuss at opensolaris dot org
_______________________________________________
docs-discuss mailing list
docs-discuss at opensolaris dot org

_______________________________________________
docs-discuss mailing list
docs-discuss at opensolaris dot org


rheilke

Posts: 651
From: CA

Registered: 6/14/05
Re: [docs-discuss] scp no-clobber option??
Posted: Nov 11, 2009 9:40 AM   in response to: alanm

  Click to reply to this thread Reply

Actually, yes. I always forget about it, as it's just a little more
complicated and I've not tried it. But yes, one guy where I used to work
swore by it, using it all the time for just this reason.

Good catch.

Rainer

alan mcclellan wrote:
> Does rsync do what you want (update only the modified files)?
>
> -alan
>
> Rainer Heilke wrote:
>> Sorry, I've looked for something like this several times myself, but
>> never found anything.
>>
>> What I tend to do now is scp everything to a new directory, and then
>> mv -i it to the final spot. Does nothing to conserve disk space or
>> network traffic, though...
>>
>> Rainer
>>
>> Euan Thoms wrote:
>>> Is there an option for no-clobber (does not overwrite existing files)
>>> in the command scp? "man scp" doesn' t reveal anything. I got one hit
>>> in google which indicated that there was but perhaps that was the GNU
>>> version of scp.

_______________________________________________
docs-discuss mailing list
docs-discuss at opensolaris dot org





Terms of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
Copyright © 1995-2005 Sun Microsystems, Inc.