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
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply 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: 35253
    
    7
What kind of access do you have to that machine - FTP, HTTP, NFS, SMB, Telnet, SSH, ... ?


Android appsImageJ pluginsJava web charts
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: 35253
    
    7
There are a number of Java SSH libraries, e.g. sshtools and JSch.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Best way to read a remote file
 
Similar Threads
Serializing a file over RMI
can you
doPost() vs doPut()
files
Option tor read FTP file to string variable.