jhollin1138 Posted October 27, 2006 Share Posted October 27, 2006 I admit it, I use Windows XP and not Linux. Although I do have some past UNIX experience (HP-UX) from when I was a system admin several years ago, so I know I can do what I want to do. I just can't remember how. I host some RSS feeds for a friend. When the feeds run into a problem, the write to an error log. I would like to setup a cron job that will delete the error log once a week. I know how to do the cron side. I am just unsure about the actual delete command structure to run. Any help? Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted October 27, 2006 Share Posted October 27, 2006 In cPanel select Cron Jobs. Then select Standard. There is a simple set of boxes that you can check the day of the week, time of day and frequency to run the job. Just enter a path to a script that removes the file. You could try using: >rm /home/cPanelname/path-to-file But that is running a system command and I don't know if it is allowed or will work. Quote Link to comment Share on other sites More sharing options...
TCH-Rick Posted October 28, 2006 Share Posted October 28, 2006 You should be able to do what you want depending on ownership and permissions of the file. I would suggest using: rm -f /home/cPanelname/path-to-file Quote Link to comment Share on other sites More sharing options...
jhollin1138 Posted October 28, 2006 Author Share Posted October 28, 2006 Thanks Bruce and Rick, now I remember the "rm" command. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.