Editing at the command line
I have a couple of simple questions that I can't seem to figure out. I usually work on the desktop, but I'm working on a server through the terminal now so it's kind of new to me. First, when I type crontab -e (to edit the crontab file), what editor am I getting? I'm having trouble finding my around in it. Second, to execute a php file in this cron job, would I use /usr/bin/php path_to_file?
|
Regarding the first question, normally crontab -e uses /bin/vi, but eventually you have to specify the editor by setting the environment variable EDITOR, e.g.
Code:
export EDITOR=/bin/vi in bash/sh |
The default editor for crontab in every Linux distro I've seen is vi. If you'd like to edit with nano, for example, you can use:
Code:
[hector@troy ~]$ export EDITOR=nano |
All times are GMT -5. The time now is 09:28 AM. |