Re: [JSch-users] Use of sftp
Status: Alpha
Brought to you by:
ymnk
From: Vijaya N. <vi...@hp...> - 2011-08-11 02:25:30
|
Hi, But the code fragment gets stuck during the out.close() statement. Can you please let me know how to handle that. while(true) { if(channel.isClosed()) { System.out.println("exit-status: " + channel.getExitStatus()); break; } try { Thread.sleep(1000); } catch(Exception ee) {} } System.out.println(">>>out from while loop"); System.out.println(">>>before close"); out.close(); I have one more question. It works fine, except that it gets stuck before close() or disconnect() which ever comes first. I measured the time, it is really amazing, it is about 4 or 5 times faster than regular scp and gsiftp. We really like the speed. We are wondering whether the same can be done for "put"/uploading files. Is there any way we can tar the local folder and send to remote shell ? Can you please let me know. we are very eager to try that out. Thanks a lot. Viji On 8/10/2011 6:56 PM, Atsuhiko Yamanaka wrote: > Hi, > > +-From: Vijaya Natarajan<vi...@hp...> -- > |_Date: Wed, 10 Aug 2011 11:37:27 -0700 ________ > | > |The file that is created /tmp/foo.tgz, but if i do local command tar > |xvf- /tmp/foo.gz, > |that local command also keeps hanging and not coming back. > > tar xzvf /tmp/foo.tgz > > |Also, I have one more question unrelated to this topic, > |if i want to transfer two concurrent files at the same time, do i have > |to open two connections, > |or just one connection and use two channels ? > > I have not tried such operations, but both of them will work. > > > Sincerely, > -- > Atsuhiko Yamanaka > JCraft,Inc. > 1-14-20 HONCHO AOBA-KU, > SENDAI, MIYAGI 980-0014 Japan. > Tel +81-22-723-2150 > +1-415-578-3454 > Skype callto://jcraft/ > Twitter: http://twitter.com/ymnk > Facebook: http://facebook.com/aymnk |