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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix Log Script

Status
Not open for further replies.

heprox

IS-IT--Management
Dec 16, 2002
178
US
I'm working on a AIX 4.3.3 running Oracle 8i. I need to create a script (preferably in Korn) that does the following:

1. Identifies files (log files and *.err files)in several directories, in a loop, that are older than 24 hours.

2. Places all of the identified files from step #1 and places them in a compressed tar file (with a file name in mmddyy format)in a specific directory.

3. Initiates an FTP session that moves the file to a remote server.

Step #3 is optional (I may do this in VB from the parent FTP server and just get the file in reverse).

Ideas:
Using "find $dirs -type f -name "*.err" -atime +1" or someting similar, but can't figure out how to designate what directories to look in (handled by a variable?) and how to move them through a loop. I'm thinking of just designating the directories and the filenames (to be looked for) by comma-deliminated variables? Any help would be appreciatted. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top