
Remove File older than 30 days:find /path_to_file/ * -mtime +30 -exec rm {} \;
Remove File older than 7 days:find /path_to_file/ * -mtime +7 -exec rm {} \;
Remove Specific file type older than 7 days:find *.xml -mtime +7 -exec rm {} \;
Remove File older than 30 days:find /path_to_file/ * -mtime +30 -exec rm {} \;
Remove File older than 7 days:find /path_to_file/ * -mtime +7 -exec rm {} \;
Remove Specific file type older than 7 days:find *.xml -mtime +7 -exec rm {} \;
© 2020 www.aws-senior.com - www.aws-senior.com www.aws-senior.com.