Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] scp: how to overwrite 444 protected files



On Fri, Nov 12, 2010 at 09:38:16AM +0100, Josh Glover wrote:
> On 12 November 2010 08:00, Christian Horn <chorn@example.com> wrote:
> 
> > So give this a try:
> > $ tar cf - file|(ssh remotehost "tar xvf -")
> 
> Just as a matter of interest, you can dispense with all of the parens
> and quoting if you are lazy:
> tar cf - file | ssh remotehost tar xvf -
> 
> Quoting to a remote shell can be tricky (you have to escape quotes or
> wrap them in single quotes), so I dispense with it whenever possible.

Here i mostly end up with tunneling the data over multiple
hosts like this:

tar cf - file | ( ssh remote1 "ssh remote2 'ssh remote3 "cd /dest && tar xvf -"'" )

but using variables here would be hell, true..


Christian


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links