Hi ranchers, I have a requirement like this: I want to tar a series log files that start from a certain time and end to a certain time. And my present approach is using "ls -lt" to display all files ordered by time and copy them one by one to another folder. After this be done, tar that folder. Is there any convenient way? Thanks.
SCJP 1.4 SCJD
Joined: Dec 27, 2002
If you don't mind writing a config file rather than a script, you could use the logrotate command in a cron job to do everything you mentioned.
Life is good on the Ponderosa,<br />but mind where you step.