Monday, November 2, 2020

 

Deleting the files between particular dates

Code:

find ./ -mtime +30 -type f -print

 

The above command will show all files modified 30 days ago or more - use the print statement first to be sure that you find the correct files and do check it's what you want. Then you can run the command again with the delete function added like this;


Code:

find ./ -mtime +30 -type f -exec rm {} \;


No comments:

Post a Comment

  RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time https://shivanandarao-oracle.com/2012/12/05/rman-20207-until-time-or-re...