[Cialug] scp w/full path

L. V. Lammert lvl at omnitec.net
Mon Mar 3 10:21:41 CST 2014


On Mon, 3 Mar 2014, Jeffrey Ollie wrote:

> 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.
>
'-r' is not really what's needed, as the "upstream" path is what's
important - i.e. if I want to copy a single file, I woud like to do:

	scp index.php production:

Instead of:

	scp index.php production:/srv/sitename/htdocs

The same issue would occur for rsync, .. it's not 'descendant' paths,
rather the 'ancestor' path.

It may be a simple variation on $PWD, but I have not been able to test
yet.

	Thanks!

	Lee


More information about the Cialug mailing list