Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-17-2008, 01:22 AM   #1
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.

Old 10-17-2008, 05:50 PM   #2
LQ 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, 07:15 PM   #3
LQ Newbie
Registered: Mar 2005
Location: Sydney
Distribution: Suse, Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0

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

Thank you so much for great help.




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 04:03 PM
crontab help Linux - Newbie 6 03-31-2008 09:23 PM
using crontab to back up files tomolesonjr Linux - Newbie 1 04-27-2006 06:15 PM
su in crontab nonothing Linux - General 4 12-15-2004 08:58 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:47 PM.

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