Results 1 to 2 of 2
Hello friends,
I am trying to implement retention of two days in a directory in Linux box. I have implemented below code to achieve. This code works fine in AIX, ...
- 09-22-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 1
Command not working "find * -name "*exp.log" -mtime +2 -exec rm {} \;"
Hello friends,
I am trying to implement retention of two days in a directory in Linux box. I have implemented below code to achieve. This code works fine in AIX, however the same code does not work on Linux OS. Can somebody let me know here I am going wrong:
find * -name "*exp.log" -mtime +2 -exec rm {} \;
find /backups/oradata/${ORACLE_SID}/LEN_DP_DIR/* -name '*exp.log' -mtime +2 -exec rm {} \;
Would appreciate your response.
Thanks
- 09-22-2010 #2Just Joined!
- Join Date
- Aug 2010
- Posts
- 18
It would be better to use -delete instead of exec rm {}.
Use -print to check.Code:find /backups/oradata/${ORACLE_SID}/LEN_DP_DIR/* -mtime +2 -name "*.log" -delete


Reply With Quote