remote host log rotation

Matt Morgan minxmertzmomo at gmail.com
Thu Feb 9 23:22:45 UTC 2006


I'm about to write a script that

a) ssh's to a web host
b) moves the httpd access_log to a new name
c) scp's that rotated log locally
d) runs md5sums on the local and remote copies to compare them
e) deletes the remote version if they are identical, or loops back to
step C and tries again if they are not.

But it occurred to me, lots of other people must have had the same
problem. Anyone know of an existing script or tool that does things
like this? It doesn't seem terribly hard, but then, I'm a pretty slow
programmer.

Thanks,
Matt




More information about the fedora-list mailing list