Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script to copy log file to new directory

Status
Not open for further replies.

Ronfogg

Technical User
Oct 19, 2001
10
US
Hi people. Does anyone have a good script for copying a log file, moving it to another directory, and renaming it for debugging later? I am currently running a debug on a 3rd party application. I want to be able to copy a log covering 'x' period of time to another directory. I want to add date/time stamp info to keep each file unique. This is to prevent loss of info when the debug overwrites at the beginning of each new day. I am NOT a script writer, but hope to learn with your help. THANKS!
 
For 'levw': Yes, thanks! I knew it would be something fairly quick like this. I modified the 'date' parameter, but otherwise it did the job. Thanks for the help
 
If it's a system log the /etc/syslog.conf can possibly do it for you. There are some sample entries in there on how to go about it.

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top