If we running the database on the server then there will lot of log files and trace files created on the server. We might need to keep 30 days of data for audit and delete the older files to avoid disk space issues.
1. Delete Files Older Than 30 Days
Use the below command to list the files older than 30 days in /var/log
Sometimes the number of files older than 30 days might be huge, in that case, we might just need the count of files older than 30 days. Please use the below command to find the count of files older than 30 days.
The below command will delete all the files older than 30 days in /var/log.
2. Delete Files Older Than 30 Days with .trc extension
List files older than 30 days with .trc extension in /oracl/prd/trace location.
Find count of files older than 30 days with .trc extension in /oracl/prd/trace location.
Delete all the files older than 30 days with .trc extension in /oracl/prd/trace location.
1. Delete Files Older Than 30 Days
Use the below command to list the files older than 30 days in /var/log
Sometimes the number of files older than 30 days might be huge, in that case, we might just need the count of files older than 30 days. Please use the below command to find the count of files older than 30 days.
The below command will delete all the files older than 30 days in /var/log.
2. Delete Files Older Than 30 Days with .trc extension
List files older than 30 days with .trc extension in /oracl/prd/trace location.
Find count of files older than 30 days with .trc extension in /oracl/prd/trace location.
Delete all the files older than 30 days with .trc extension in /oracl/prd/trace location.
Comments
Post a Comment