Portal Home > Knowledgebase > Articles Database > Crontab editing error
Crontab editing error
Posted by Dawizz, 01-13-2008, 02:04 AM |
Hi Guys,
I have a strange problem (most likly user error ) I am trying to edit crontab using crontab -e, I seem to get to it okay but I am unable to edit anything in there, at the end of the file there are ~ in there, and I cant even delete them. Its like the file is locked.
Has anyone got any suggestens???
Thanks,
|
Posted by psyxakias, 01-13-2008, 02:16 AM |
That's probably because your O/S uses vi as default editor.
You may read vi's helpfile by typing (after startign crontab -e):
:viusage
Or if you would prefer pico/nano as default editor, you may set this on your bash profile and re-login:
export EDITOR=pico
or
export EDITOR=nano
|
Posted by Dawizz, 01-13-2008, 02:30 AM |
Thanks for that, it worked, now it is saving to the tmp directory...
|
Posted by ub3r, 01-13-2008, 03:07 AM |
it does that.
|
Posted by psyxakias, 01-13-2008, 03:16 AM |
It always saves to tmp directory and once you exit the editor, it should be removing the file
|
Posted by ub3r, 01-13-2008, 03:31 AM |
it saves it, then the crontab thing copies it to the proper location.
to verify, go to /var/spool/cron/ and check the user's crontab.
|
Posted by Dawizz, 01-13-2008, 05:25 AM |
Yeah it did save it, I never seen the crontab save to tmp directory before, or maybe i just never noticed,
Thanks all for your help.. :-)
|
Add to Favourites Print this Article
Also Read