ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
The nake of the file doesn't matter nor does the location.
I would create a directory called "cron" in the home dir of the user it will be run as:
In that put:
I put all my scripts in the jobs directory and output the logs to the logs directory (same name as the job with a .log extension)
In the /root/cron dir I create my cron files. If there is only one server it is usually "cron.standard" if it is a 2 system failover "cron.master" and "cron.slave". To load a crontab file (eg cron.standard) run:
You cna check that it has loaded using:
I have only dealt with CRON on Solaris, but I ran into lots of problems with extra spaces and newlines in my cronfile. Be careful about them, seems that cron is sensitive to them. Especially newlines after your line
Ok, so, I have this cron file. I call it cron.mine (?) and put it in cron/jobs. It says:
0 10 * * /root/cron/jobs mail -s pengun "It's 10 o'clock" root
to let it email me whenever it's 10 o'clock. (tell me if i'm right.)
oh, and would it email to user penguin or user root?
sadly, I just killed(ish) my linux drive... must reformat
NEVER delete things as root unless it's one thing and you must read it carefully, never just say y y y y y y to "do you wanna delete this?" because bad things happen..