We want to automate the process of removing old directories from /var/spool/abrt/
.
We have RHEL machines - version 7.x.
The known way is to do the following
# systemctl stop abrtd
# systemctl stop abrt-oops
And we can remove all those directories and files with following rm command:
# abrt-cli rm /var/spool/abrt/*
And then start the services
# systemctl start abrtd
# systemctl start abrt-oops
We want to simplify the deletion process as the following -- it will delete the directories that are older than 10 days from /var/spool/abrt/
find /var/spool/abrt/ -type d -ctime +10 -exec rm -rf {} \;
is it a good alternative to purge the /var/spool/abrt/
directory?