1826860 Members
3046 Online
109704 Solutions
New Discussion

Re: crontab questioin

 
iambluegary
Advisor

crontab questioin

when i use crontab -e,there's something wrong
#crontab -e
h >/dev/null 2>&~

and i cant edit ,after ctrl+c exit,i find i can input anything ,what's the problem?
help ,help,help :-)
3 REPLIES 3
Michael Tully
Honored Contributor

Re: crontab questioin

Hi,

Not sure I understand your question:

Is that the text that appears after starting
crontab -e command?

One thing I always like to point out is,
never to use 'crontab -e' but use
'crontab -l >/tmp/wrk'
Make my changes and then resubmit the
cron file like this:
# crontab /tmp/wrk

The reason I suggest this is, that anything
goes wrong during the initial edit, like
your terminal or PC hangs, you may lose
the whole contenst of your cron file.
Using the work file eliminates this risk.

~Michael~
Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: crontab questioin

One more thought:

If that is the output when you run:
# crontab -e

then your crontab file is certainly corrupted. You will have to get from your backup.

Make sure that in the future you only use 'crontab -l >/tmp/wrkfile'

It will save you next time.

Michael
Anyone for a Mutiny ?
Steven Sim Kok Leong
Honored Contributor

Re: crontab questioin

Hi,

Did you set your editor?

# export EDITOR=vi

With regards to your other query, this problem could might also be due to your emulation problem. Eg.

# export TERM=vt100

Use an appropriate value for TERM.

Hope this helps. Regards.

Steven Sim Kok Leong