Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Definitely check mail using eg mailx, both as root and as the job owner.
Also, I'd be inclined to always specify full absolute paths to all cmds/files referenced eg that logs.txt file.
Easiest way is to just explicitly call a shell file in cron, then (after the shebang line eg '#!/bin/bash'', in the next line) set PATH explicitly as reqd for your prog eg copy the content of your .bash_profile.
a basic way to debug bash is to use
after the shebang line; it shows what the parser is doing.
In cron you'll prob get the output emailed, although you can also do
* * * * * /dir/t.sh >/tmp/t.log 2>&1
PS always use 'crontbab -e' to edit your cron file. If you edit it directly cron daemon may not be notified of the change.
I want to download cron pdf for learning can anyone provide me the link to download it.
Please do not thread jack other people's threads. If you have a serious question, search these forums first, and if you can not find the answer you are looking for, then by all means create a new thread. Now as far as your "question," try search online, specifically on google, for "cron guide" and you will find quite a few results.
You shouldn't be setting your permissions like that, you'll get pwned. You've set the script that you're running from cron to be world-writable, and put it in the tmp directory. If anybody gets access to your machine, they can change that script to whatever they want, and if they are malicious, you can wave bye-bye to your machine and your precious data. You should never set any executable to be world-writable. There is no need for it.