[Cialug] scp w/full path

Barry Von Ahsen vonahsen at gmail.com
Mon Mar 3 10:23:37 CST 2014


I don't think he wants to type the path on both sides


my lazy solution usually is:

cd /to/the/path
pwd (copy output)
scp user at host:<paste> .



-barry




On Mar 3, 2014, at 10:14 AM, Dave Hala <dave at 58ghz.net> wrote:

> Try:
> scp -r /var/lib/the/path/* root at host.name.com:/usr/share/other/path
> 
> :) Dave
> 
> 
> 
> On Mon, Mar 3, 2014 at 10:09 AM, Jeffrey Ollie <jeff at ocjtech.us> wrote:
>> On Mon, Mar 3, 2014 at 9:56 AM, L. V. Lammert <lvl at omnitec.net> wrote:
>>> On Mon, 3 Mar 2014, Jeffrey Ollie wrote:
>>> 
>>>> On Sat, Mar 1, 2014 at 8:40 AM, L. V. Lammert <lvl at omnitec.net> wrote:
>>>>> Is there a way to copy *with the full path* in scp?
>>>> 
>>>> Do you mean like this?
>>>> 
>>>> scp /var/lib/the/path root at host.name.com:/usr/share/other/path
>>>> 
>>> Not quite, .. would like to include the full path without explictly
>>> specifying - i.e. a switch, for example, that will mirror the full path on
>>> the target machine.
>> 
>> I think maybe you want the '-r' switch then, which will recursively
>> copy a directory tree, or try David's suggestion of rsync over SSH.
>> 
>> --
>> Jeff Ollie
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug



More information about the Cialug mailing list