For Example:
find . -name *.log.5 -exec /bin/rm '{}' \;Of course, you need to understand the naming convention of your logs. Here's a quick example of finding and removing files with a date appended to the original log name. This command will remove all the log files for the first 9 days of August 2011.
find . -name *.log.2011-08-0* -exec /bin/rm '{}' \;