Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

FTP: CDSW to Unix server

New Contributor

Hi,

Can anyone guide me to make ftp between CDSW and Unix server, to upload & download the file, using R.

 

Please reply ASAP, As i need guidance on urgent basis...

1 REPLY 1

Contributor

You could use RCurl

 

#https://cran.r-project.org/web/packages/RCurl/RCurl.pdf

library
(RCurl)

# Get Example
uris = c("http://www.omegahat.net/RCurl/index.html", "http://www.omegahat.net/RCurl/philosophy.xml")
txt = getURIAsynchronous(uris)

# FTP Upload
ftpUpload(I("Some text to be uploaded into a file\nwith several lines"),
"ftp://login:password@laptop17/ftp/zoe", ) ftpUpload(I("Some text to be uploaded into a file\nwith several lines"),
"ftp://laptop17/ftp/zoe", userpwd = "login:password" ) ftpUpload(system.file("examples", "system.png", package = "RCurl"),
"ftp://login:password@laptop17/ftp/Election.rda", postquote = c("CWD subdir", "RNFR Election.rda", "RNTO ElectionPolls.rda") )

 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.