It's not a secret anymore!*
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
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: 41800
    
  62
What kind of access do you have to that machine - FTP, HTTP, NFS, SMB, Telnet, SSH, ... ?


Ping & DNS - my free Android networking tools app
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: 41800
    
  62
There are a number of Java SSH libraries, e.g. sshtools and JSch.
 
jQuery in Action, 2nd edition
 
subject: Best way to read a remote file