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.
First you have to check if the cron daemon is running and if you as a user are allowed to run cron jobs, but don't worry too much, since Linux enables that by default (just check if something doesn't work). To write your own crontab you will issue the command
it will open a vi session in which you can write your own cron jobs. Then save and quit and the system will store the proper file in the proper location automatically. Check man crontab for other options of the crontab command (for example to display or to remove the current crontab).
For the format of a crontab line, that is how to specify a cron job see
man 5 crontab
it describes the crontab format and gives some useful examples. If you're in trouble feel free to ask.
I have created a script to take backup. when i run this script using the browser it will work fine and create tar.gz files but when i try to run this using the command line in Linux it will display a error:
tar: Removing leading `/' from member names
now what to do to solve this problem.
my script code is below
###### script code start here #############
When you are executing a script from cron, you should be careful to expand all paths in your script. You might be running the script from a location where you have all the files needed and the script might execute just fine from the command line. But when you put it in the cron file , it will fail. This is a common mistake we do.
To run a cronjob every 15 minutes another way would be :