need to have permissions on log directory Array ( [0] => help [1] => logdir [2] => execute ) delete tomcatlogs Usage: php DeleteOldTomcatLogs.php [