remote.copy.to: Copy file/dir to remote server from local server

Description Usage Arguments Value Author(s) Examples

View source: R/Utils.R

Description

Copies the file/dir to the remote server from the local server. If the dst is a folder it will copy the file into that folder.

Usage

1
remote.copy.to(host, src, dst, options = NULL, delete = FALSE, stderr = FALSE)

Arguments

host

host structure to execute command on

src

local file/dir to copy

dst

remote file/dir to copy to

options

additional arguments to be passed to rsync command

delete

in case of local dir should all non-existent files be removed

stderr

should stderr be returned as well.

Value

output of command executed

Author(s)

Rob Kooper

Examples

1
2
3
4
5
6
7
## Not run: 

 # ssh -n -N -f -o ControlMaster=yes -S ~/tunnel/tunnel  hamzed`@`cc-login.campuscluster.illinois.edu
  host <- list(name='cc-login.campuscluster.illinois.edu', user='hamzed', tunnel='~/tunnel')
  remote.copy.to(host, '~/pSIMS', '/projects/aces/hamzed/psims/Data/NewP', delete=TRUE)

## End(Not run)

AgronomicForecastingLab/pSIMSSiteMaker documentation built on March 6, 2021, 2:27 p.m.