LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 10-17-2008, 02:22 AM   #1
raminn
LQ Newbie
 
Registered: Mar 2005
Location: Sydney
Distribution: Suse, Ubuntu
Posts: 5

Rep: Reputation: 0
Angry replaced crontab, now should get crontab back to what it was


Hi all,

I was trying to learn how crontab works. I made a file with an echo command in it and used crontab -u root myfile.

The problem is that when i checked crontab -l i saw that all other jobs were gone and there only was myfile. I used crontab -r in hope that after removing it'll be back to its before jobs. But now when i use crontab -l it says 'no crontab for root'. I tried service crond restart, but no change. How can i get it back to the way it was? Though i had no idea what jobs it had. This is very urgent as i did on an important server.

Thanks for the help in advance.

Ramin.
 
Old 10-17-2008, 06:50 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you have a backup?

Look for /var/spool/cron/root
 
Old 10-20-2008, 08:15 PM   #3
raminn
LQ Newbie
 
Registered: Mar 2005
Location: Sydney
Distribution: Suse, Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Talking

Yes, it was there and i used it to restore crontab.

Thank you so much for great help.

Ramin.
 
  


Reply

Tags
crontab


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
man crontab(5) vs crontab(1) Canis Polaris Linux - Newbie 2 06-04-2008 05:03 PM
crontab help i.you Linux - Newbie 6 03-31-2008 10:23 PM
using crontab to back up files tomolesonjr Linux - Newbie 1 04-27-2006 07:15 PM
su in crontab nonothing Linux - General 4 12-15-2004 09:58 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration