R in Ubuntu Server 14.04 - Writing file to a samba sharing in which a directory is protected by user/pass

点点圈 提交于 2019-12-25 03:32:22

问题


I was wondering if writing to a protected samba directory, to a internal directory with another user/pass could be possible. I have been searching for an R package with these capabilities but I haven't found it yet. Now I'm using the write() function. In the documentation for this function, it says:

Arguments:

x : The data to be written out, usually an atomic vector.

file : A connection, or a character string naming the file to write to. If "", print to the standard output connection. If it is "|cmd", the output is piped to the command given by ‘cmd’.

I don't understand if the attribute "file" when writing "|cmd" launches the Terminal in Ubuntu server or something, but I can't make it work

Hope you have a nice day!


回答1:


I found it can be done via a shell script in Ubuntu. The command is write(somefile, file = "|sh shellWriteSamba.sh")

Edit: The complete solution is in R - write() a file to a SAMBA share



来源:https://stackoverflow.com/questions/30048642/r-in-ubuntu-server-14-04-writing-file-to-a-samba-sharing-in-which-a-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!