Crontab creating multiple files with increasing numbers like php.1 php.2

The crontab in ubuntu was creating muntiple files with same name as the file in execution.

I was running the file fr_bom.php in cron tab and it created multiple file like this

fr_bom.php.409 fr_bom.php.410 fr_bom.php.411

I was wondering how do delete them suddenly it flashed to me that i should use wild card

I used rm fr_bom.php.* to remove all the files.

Also you can add a crontab to remove these files every day once like this each day at 6:30 PM.

30     18     *     *     *         rm fr_bom.php.*

Get More updates on your Email:

Related Articles

This entry was posted in Ubuntu and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.