Redirecting one output to another file
hi
i have installed squid proxy server in rhel and am continuously monitoring the log messages in /var/log/squid/access.logs in that i search only TCP_DENIED through grep command i want to redirect or copy that TCP_DENIED messages to a file can u help me out how should i copy or redirect denid messages in a file if there is any possibilities to redirect messages by date by date please tell me the solution i need it urgently please help me out |
Something like this?
Code:
grep TCP_DENIED /var/log/squid/access.logs >> /tmp/output.txt |
thanqs alot i got the solution i have one more query can i run cronjobs for particular time like 14:00-16:00 hrs
i want to copy denied messages, is it possibl,e give me the solution thanks®ards |
Quote:
To run the command every 15 minutes (*/15) and between the hours of 2 and 4 (14-16) you can add this to your crontab by running "crontab -e" Code:
*/15 14-16 * * * grep TCP_DENIED /var/log/squid/access.logs >> /tmp/output.txt |
All times are GMT -5. The time now is 03:45 PM. |