![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| crontab | rajan_ka1 | Shell Programming and Scripting | 10 | 03-21-2006 02:03 PM |
| SZ in crontab | manikumar | UNIX for Advanced & Expert Users | 1 | 03-08-2006 07:31 PM |
| Messed up tar files | Barb | UNIX for Dummies Questions & Answers | 2 | 11-03-2004 08:24 AM |
| ALERT!!! ALERT!!! I messed up the UNIX!!! | Fwurm | UNIX for Dummies Questions & Answers | 15 | 11-06-2001 02:53 AM |
| how do u remove a messed up freebsd boot installation? | coffeecoolers | UNIX for Dummies Questions & Answers | 1 | 08-05-2001 07:48 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I think I have messed up with crontab
Hi
Guy, In my system there were some cronjob were already scheduled. and somehow I want to enter one new cronjob with crontab. So I isssue crontab temp.txt. it scheduled that job but now it's showing me only this job with crontab -l. but I can not see the old cronjob list that already set up. Is there anyway to set back those cronjob. i am guessing I have messed up those things. please give me clue to get back old cronjob. Thanks, Vishal |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Typically what you see in /var/spool/cron/crontabs (or similar) is what you get, unless you have some version control or .bak files from your editor stashed away locally.
|
|
#3
|
|||
|
|||
|
Your command told cron to copy this file (temp.txt) over the old file (/var/spool/cron/crontabs/<username> or similar), so the old version is gone like boxing champions: never to come back.
The only way to get it back is doing a resore of some sort: if a daily backup of the system is made the crontab should be in there and you can restore it. I don't know your system, if it is AIX: ask the other systems administrators about the "mksysb" and restore it from there. Probably there is some tape backup of the system where you can find the old crontab file. Another possibility is that the crontab files are in some sort of version control system, so the last version could be restored from there. If you have displayed the old crontab on your screen before and haven't done that much in this particular window you could try to find the old contents of the crontab file in the screen buffer. Use (this is true for xterms, other terminals might work differently) <SHIFT>-<PgUp> to scroll upwards until you find the crontabs contents, use copy&paste to put it into a file and use the command you already know - "crontab filename" - to put it back into place. I hope this helps. bakunin |
|||
| Google The UNIX and Linux Forums |