Our blog
Cron Creating Lots of Files in Home Directory
If you have some cron jobs set up and you are finding large amounts of files saved in your home directory (or root) then perhaps you have the same issue I had.
I was using wget to call on some PHP scripts to run periodically. wget will do what it says on the tin and save the files. If you don't want it to do that, you need to add the following in front of your wget command:
-
-O /dev/null
eg
-
wget -O /dev/null http://script.com/script.php
More Reading:
2 Comments
|
to clean up those files created by wget, try this command: CODE:
|
|
I actually was using a -O /dev/null in my cron but I discovered I had over 12000 0 byte files in a folder just outside my public_html folder. I didn't really want to just make another cron to fix it so to avoid this problem I used this cron instead: /usr/bin/php -c /path/to/php.ini /path/to/cron.php |
RSS Feed
admin
September 22nd, 2009