Logadm

I need to delete the logs using logadm command. we have application that generates to logs automatically with different dates every day like error_20121121.log and so on... using lodadm can i delete the logs of last 10 days using crontabentry? i am confuse here becasue if we use logadm what logfile should i give logadm /var/app/logs/....? because it has same logfiles with different dates. can any one suggest?

The man page Man Page for logadm (all Section 1m) - The UNIX and Linux Forums says for a given path, it renames them path.0, path.1 and deletes the 11th by default, assuming it has permissions.

For applications that keep the log file open for writing, you need to provide commands that will convince it to close and reopen the file, usuall a kill -SIGNAL_MACRO $pid that $pid catches. Otherwise, it keeps writing the original inode no matter what names it has. Other apps are opening for append on each message or run, so mere renaming will ensure a new log file is used in the near future.

Use root and the config file, so the rotation configuration is not hidden in crontab's and scripts.