![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| crontab couldn't run through, help | duke0001 | UNIX for Advanced & Expert Users | 10 | 02-06-2008 12:22 AM |
| help with crontab | bob122480 | Shell Programming and Scripting | 3 | 01-22-2007 05:49 PM |
| Crontab | gen4ik | UNIX for Dummies Questions & Answers | 1 | 01-18-2007 04:26 AM |
| ftp and crontab | user` | Shell Programming and Scripting | 27 | 11-13-2006 05:02 PM |
| Crontab | lo-lp-kl | UNIX for Dummies Questions & Answers | 2 | 05-05-2005 03:21 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
does anyone know how to get the crontab back?
i have erased it by mistake! thanx in advance |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
crontab filename
Slow down... You are most likely not in trouble here...
Maybe you didn't "erase", you probably just pointed it at a new config file. If you typed "crontab somefile" you only replaced it with another file. Depending on your system OS, go /var/spool/cron/crontabs directory. Do an ls and look for a file called "root" If there, do a cat to see if that is your original crontab. Then do a "crontab root" to relink it to the crontab. If you typed crontab somefile. That file will replace your crontab file. To prevent you from doing this in the future, I would suggest the following. ________________________________ In a directory where you keep config files. I make a dir called /root/mydir. cd /root/mydir crontab -l > mytempcron # this will save a copy of your crontab file for root or whomever you are logged in as at the moment. Then if you want to change the crontab. vi mytempcron # edit the file to your specifications. Then to move into place. crontab mytempcron # use the crontab command to assign a file for the crontab to read and execute. __________________________ If you actually deleted root's cron config file. Then you may be in trouble. If you have a backup utility, that may be your saviour.
__________________
My brain is your brain |
||||
| Google The UNIX and Linux Forums |