LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 06-25-2011, 10:23 AM   #1
ubuntunewby
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Rep: Reputation: Disabled
Question Questions regarding crontab


OK!!.I'm a true newbie when it comes to Linux, but I really want to learn as much as I can. I switch from Red Hat to Ubuntu and I was using the crontab command and something strange happen. Keep in mind I'm totally playing around with these commands and I dont fully understand what they are able to do. Any good website will help tpp. But can someone PLEASE TELL WHAT JUST HAPPENED BELOW?

/home/newbie crontab
10 3 17 6 0 ps -uax> cron_ps_output

then I tried
/home/newbie crontab -l
#DO NOT EDIT THIS FILE - edit the master and reinstall.
#(-installed on Sat Jun 18 11:58:19 2011)
#(Cron version - $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)

10 3 17 6 0 ps -uax> cron_ps_output
/home/newbie crontab -r
/home/newbie crontab -l

no crontab for newbie

Last edited by ubuntunewby; 06-25-2011 at 10:54 AM.
 
Old 06-25-2011, 10:30 AM   #2
tnaq
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Rep: Reputation: Disabled
look , you can get most important information of each tools by using a 'man crontab' or man [some-thing] .

remember each program get it's argument after it's name not before it.
you can redirect the standard output of your program to specific file by '>' command as you did with 'ps' command output.
 
1 members found this post helpful.
Old 06-25-2011, 10:54 AM   #3
ubuntunewby
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Question

OK. I understand that part, but what does this part mean.

/home/newbie crontab -l
#DO NOT EDIT THIS FILE - edit the master and reinstall.
#(-installed on Sat Jun 18 11:58:19 2011)
#(Cron version - $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)


I'm wondering if I did something really wrong.
 
Old 06-25-2011, 12:54 PM   #4
tnaq
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Rep: Reputation: Disabled
1.you should know what crontab really do !
2.which file you had tried to change ?
3.what is your directory content ?!
ans:
1. $man crontab
2. $crontab [option] file // what was that file ?
3. $ls -l // see if there is related file to crontab
 
1 members found this post helpful.
Old 06-25-2011, 03:45 PM   #5
spazticclown
Member
 
Registered: Sep 2010
Distribution: Fedora, Android, CentOS
Posts: 91
Blog Entries: 2

Rep: Reputation: 21
$ crontab -l
$ crontab -r
$ crontab -l

You showed what is in your crontab, then you deleted your crontab, then you showed it again. The lines beginning with '#' are comments at the top of your crontab telling you not to change the file because you might prevent something from running properly.

As stated before more information can be displayed by "man crontab" in a console.

Hope this helps you.
 
1 members found this post helpful.
Old 06-25-2011, 08:55 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,345
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
You edit crontab files by running crontab -e to bring up the editor, not by editing them directly.

Good reference here: http://adminschoice.com/crontab-quick-reference
 
1 members found this post helpful.
Old 06-26-2011, 12:16 AM   #7
wwipro
LQ Newbie
 
Registered: Jun 2011
Posts: 29

Rep: Reputation: Disabled
You can take look at /var/spool/cron/crontab directory. Here is your cron locates.
Do not modify the file on /var/spool/cron/crontab. Use crontab -e to make change.
 
1 members found this post helpful.
Old 06-26-2011, 03:44 AM   #8
lydiaXr
LQ Newbie
 
Registered: Jun 2011
Location: London
Distribution: FreeBSD, Ubuntu, Fedora
Posts: 15

Rep: Reputation: Disabled
Even if you've used 'crontab -e' to modify your crontab, you may still see those "Do not edit this file" lines. As long as you're cron jobs are working and you are using 'crontab -e' to modify your crontab, you are probably fine.
 
1 members found this post helpful.
Old 06-26-2011, 11:23 AM   #9
ubuntunewby
LQ Newbie
 
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thank you everyone for all your help. I've learned a lot
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 05:07 AM
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 07:15 PM
man crontab(5) vs crontab(1) Canis Polaris Linux - Newbie 2 06-04-2008 04:03 PM
basic questions on hostname and domain name + related postfix questions Moebius Linux - Newbie 7 09-04-2007 11:50 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration