I'm working on a AIX 4.3.3 server 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.
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.