Return to Snippet

Revision: 51438
at September 24, 2011 05:30 by nikefido


Initial Code
#!/bin/bash

remoteuser=user_name
remotecomputer=some_ip_address
ssh -l "$remoteuser" "$remotecomputer" "tail -f path/to/log/files/log-`date +"%Y-%m-%d"`.php"

Initial URL

                                

Initial Description
Check in real time changes to a log file. In this case, the file is created by date, one new one per day (a CodeIgniter log file), so some extra items were added to find the log file

Initial Title
Shell script to check log files in real time via ssh

Initial Tags

                                

Initial Language
Bash