简体   繁体   English

使用Java将文件从一个solaris 9复制到另一个

[英]copy files from one solaris 9 to another using java

How to copy file(s) from one solaris 9 machine to another solaris 9 machine using only java? 如何仅使用Java将文件从一台solaris 9机器复制到另一台solaris 9机器?

We have ssh access to both machines. 我们可以通过ssh访问两台计算机。 The java program will run on one of those two machines. Java程序将在这两台计算机之一上运行。

Update: rsync is not really an option. 更新:rsync并不是真正的选择。 can't install it easily (UNIX team is, hum, hard to deal with) 不能轻松安装(UNIX团队,哼,很难处理)

您可以使用Runtime.exec()启动rsync

Or you could use FTP. 或者您可以使用FTP。 Or you could mount some shared storage. 或者,您可以挂载一些共享存储。

use the ssh library jsch -- http://www.jcraft.com/jsch/ . 使用ssh库jsch- http://www.jcraft.com/jsch/ This program is used by ant to do ssh transfers. ant使用此程序进行ssh传输。 very good -- been there a long time(> 5 years), decent documentation. 很好-在那里呆了很长时间(> 5年),体面的文档。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Java将文件从一个文件夹复制到另一个文件夹? - How to copy files from one folder to another using Java? 如何使用 aws java sdk 将文件从 S3 存储桶从一个区域复制到另一个区域? - How to copy files from S3 bucket from one region to another region using aws java sdk? 使用 Java (Amazon S3) 将 all.txt 文件从一个 object 复制到另一个但在同一个存储桶中 - Copy all .txt files from one object to another but in the same bucket using Java (Amazon S3) 将目录,子目录和文件从一台服务器复制到Java中的另一台服务器 - Copy directories, subdirectory and files from one server to another server in java Java:将文件从一个目录复制/移动到另一个目录的安全方法 - Java: Safe way to copy/move files from one directory to another 使用Java将文本从一个文件复制到另一个文件 - Copy text from one file to another using Java 将文件列表从一个位置复制到另一位置 - Copy list of files from one location to another 将文件从一个目录复制到另一个目录,并使用时间戳附加新文件,而不是用Java覆盖 - Copy files from one directory to another and append new files with timestamp instead of overwriting in Java 如何使用JAVA依次打开存储在文件夹中的xlsx文件并将数据复制到另一个文件 - How to open xlsx files stored in a folder one by one and copy data to another file using JAVA Java文件从一台服务器复制到另一台服务器 - Java file copy from one server to another
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM