将文件形式的linux系统复制到Windows机器 [英] copy a file form linux system to windows machine
本文介绍了将文件形式的linux系统复制到Windows机器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将文件从linux机器复制到Windows机器.
为此,我在java中使用jcraft插件.
I am try to copy the files from linux machine to windows machine.
for this I am using jcraft plugin in java.
String rfile = "a.txt"
String command="scp -f "+rfile;
Channel channel=session.openChannel("exec");
((ChannelExec)channel).setCommand(command);
上面的代码适用于a.txt在(/home)目录中的时间.
但是首先我要搜索文件,然后将其复制到Windows位置.
所以我怎么写搜索命令.
当我给出这样的路径时
Above code works for when a.txt will be in (/home) directory.
but first I want to search the file and then copy it to my windows location.
so how can I write the search command.
when I am giving path like that
String rfile = "/home/reef/a.txt"
推荐答案
使用Linux机器可能会令人沮丧-确保您有权访问文件和文件夹.
JCraft [ ^ ]仅提供连接框架,操作是简单的本地Java.
Working with Linux machines can be frustrating - make sure you have got the rights to access the files and folders.
JCraft[^] only provides the connection framework, the operation is simple&native Java.
这篇关于将文件形式的linux系统复制到Windows机器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文