Results 1 to 3 of 3
I'd like to tail a file that's sitting on another server, but simply typing:
tail address.of.server:/file/to/tail >> output
doesn't seem to be doing the trick:
tail: cannot open "address.of.server:/file/to/tail" for ...
- 06-18-2008 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 2
tailing a file on another server
I'd like to tail a file that's sitting on another server, but simply typing:
tail address.of.server:/file/to/tail >> output
doesn't seem to be doing the trick:
tail: cannot open "address.of.server:/file/to/tail" for reading: No such file or directory
I'm fairly new to bash and linux in general, so how should I form this? I know how to access this file normally, and I CAN do this by just logging onto the server and then typing:
tail /file/to/tail >> output
but I, for whatever reason, want to consolidate everything to one statement, if possible.
- 06-18-2008 #2
hi,
you can use ssh to do this,
Edit- do you wanna create the output_file on the local machine(from where you are running ssh) or on the remote machine? the above command saves the output on the local machineCode:ssh yourlogin@remote_server "tail file_name" >> output_file
Last edited by khafa; 06-18-2008 at 02:10 PM. Reason: clarification
Linux and me it's a love story
- 06-18-2008 #3Just Joined!
- Join Date
- Jun 2008
- Posts
- 2
The local machine is where I want to place this file.
Thanks a lot, what I'm planning on doing is tailing an SMTP log file, then accessing the output via a Java program, searching to ensure a specific email was sent. I plan on executing the ssh line you gave to make the data more easily accessible to my program.


Reply With Quote
