nerdexam
Oracle

1Z0-821 · Question #18

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…

The correct answer is A. EDITOR=vi. 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…

Managing System Processes and Scheduling Tasks

Question

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?

Options

  • AEDITOR=vi
  • Bcrontab=vi
  • Ccrontab ?e vi
  • Denv

How the community answered

(19 responses)
  • A
    74% (14)
  • B
    5% (1)
  • C
    5% (1)
  • D
    16% (3)

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 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 specified user'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.

Topics

#crontab#EDITOR variable#environment variables#bash shell

Community Discussion

No community discussion yet for this question.

Full 1Z0-821 Practice