Click to See Complete Forum and Search --> : Shell scripts
cwbullet
11-30-2002, 05:03 PM
I have a question that i am hoping some here can answer. I want to automate a task with cron so I can take a vacation. I want to move my log files, gzip them, and rename them with a name that includes todays date (10282002 and so on). How do I accomplish this?
Chuck Haislip
cwbullet
12-01-2002, 07:43 AM
I just don't understand. Here is what I am trying to do:
Make a shell or PHP script that will:
1) Copy a file from one directory to another. It is a log file, so a shell script would work better.
2) Rename the file to include todays date. This is essential because I need to no overwrite it the next day.
3) gzip the file to save space.
I want to save stats for atleast a week so I can go on vacation and still access the raw logs.
Chuck