If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
I have build a unix script to delete last 30 days of entry from db2diag.log. Is there any command to delete the entries for the past 30 days and compress the existing db2diag.log file. Please let me know how can i do it.
In order to delete the entries in db2diag.log you can do the following
Run the following command
find . -mtime +30
Delete the file prior to 30 days
find . -mtime +30 -exec rm {}\;
This will only work if you rename the db2diag.log every day so that DB2 starts a new file each day. Otherwise, the db2diag.log will continue to collect new messages and the modified-timestamp won't be older than 30 days.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development