aspose file tools*
The moose likes Java in General and the fly likes Best way to read a remote file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Best way to read a remote file" Watch "Best way to read a remote file" New topic
Author

Best way to read a remote file

Peter Straw
Ranch Hand

Joined: Jan 08, 2002
Posts: 79
Please can you tell me the best way to read a log file on a remote linux machine. I really just need to check that the file is empty.
Many thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
What kind of access do you have to that machine - FTP, HTTP, NFS, SMB, Telnet, SSH, ... ?


Ping & DNS - updated with new look and Ping home screen widget
Peter Straw
Ranch Hand

Joined: Jan 08, 2002
Posts: 79
Hi Ulf,

It's ssh, possibly telnet and http, but doing it by ssh would be best.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
There are a number of Java SSH libraries, e.g. sshtools and JSch.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Best way to read a remote file
 
Similar Threads
Option tor read FTP file to string variable.
doPost() vs doPut()
files
Serializing a file over RMI
can you