I want to find and delete log file on linux Terminal.
Usually I use this
find -name '*.log'
after the File found, next use this script
find -name '*.log' -type f -delete
that script work for
filename.log
but now I want to find and delete file like this
mysqld.log-20180208 mysqld.log-20180223 mysqld.log-20180310 mysqld.log-20180325 mysqld.log-20180409
mysqld.log-20180123.xz mysqld.log-20180209 mysqld.log-20180224 mysqld.log-20180311 mysqld.log-20180326 mysqld.log-20180410
mysqld.log-20180124.xz mysqld.log-20180210 mysqld.log-20180225 mysqld.log-20180312 mysqld.log-20180327 mysqld.log-20180411
mysqld.log-20180125.xz mysqld.log-20180211 mysqld.log-20180226 mysqld.log-20180313
How Can I find filename.log-12313
I want delete filename.log- with number only.
Can anyone fix this?
thanks.
Im very appreciate your answer.