You are attempting to edit your crontab file in the bash shell. Instead of getting your usual vi interface, you are
presented with an unfamiliar interface. In order to have your editor of choice-vi- what command must you type
after exiting the unfamiliar editor?
A.
EDITOR=vi
B.
crontab=vi
C.
crontab – e vi
D.
env
Explanation:
Set the EDITOR variable to vi.
Commands like `crontab -e` will use ed per default. If you’d like to use some better editor (like vi) you can use
the environment variable EDITOR:
# EDITOR=vi; crontab –e will open the users crontab in vi. Of course you can set this variable permanently.
Incorrect answers
C: -e Edits a copy of the current user’s crontab file, or creates an empty file to edit if crontab does not exist.
When editing is complete, the file is installed as the user’s crontab file. If a username is given, the specifieduser’s crontab file is edited, rather than the current user’s crontab file; this can only be done by a user with the
solaris.jobs.admin authorization. The environment variable EDITOR determines which editor is invoked with the
-e option. The default editor is ed(1). All crontab jobs should be submitted using crontab. Do not add jobs by
just editing the crontab file, because cron is not aware of changes made this way.