Hi Folks,
Some time we need to delete old logs. And at the same time we want to keep files for last 2-3 days. Use below command at linux box.
For example, if you want to clear audit logs, please use below command.
find /u01/app/11.2.0.4/grid/rdbms/audit/ -mindepth 1 -type f -mtime +2 | xargs rm
Here :
"/u01/app/11.2.0.4/grid/rdbms/audit/ " is directory where find command will look
"-mtime + 2" is the current date - 2 days.
Some time we need to delete old logs. And at the same time we want to keep files for last 2-3 days. Use below command at linux box.
For example, if you want to clear audit logs, please use below command.
find /u01/app/11.2.0.4/grid/rdbms/audit/ -mindepth 1 -type f -mtime +2 | xargs rm
Here :
"/u01/app/11.2.0.4/grid/rdbms/audit/ " is directory where find command will look
"-mtime + 2" is the current date - 2 days.
No comments:
Post a Comment