Need to search large log files present in a remote unix server
posted 7 years ago
Hi all, I need to search large log files present in a remote unix server. I know that I can use SFTP APIs like Jcraft's jsch api to connect to the remote server but then copying those log files to my local machine would not be a good idea since each of them is at least 500 MB in size. I need to search through 5 or 6 such log files based on the search string input by the user and then copy relevant search data and display it to the user. Since, the log files are too big in size, I am thinking of the possibility of running a shell script in the remote server that can do the task of searching and displaying relevant results, through my java program. As of now, this process is done manually through the Putty client and I need to automate it. Is there a better way of achieving what I need to do?