SOHO : Small Office Home Office
Freeware - Opensource software tips, tricks, tweaks & fixes for managing, securing, improving the performance of SOHO Desktop, Laptop, Networks

Tuesday, July 1, 2014

Edit crontab with nano in centos the easyway

source :  http://myquickfix.co.uk/2013/09/edit-crontab-with-nano-on-centos-crontab-e/

Edit crontab with NANO on centos (crontab -e)
Posted September 25th, 2013 by Ben & filed under CentOS.

Problem: I don’t know where my root users crontab file is, and this doesn’t usually matter because using the command ‘crontab -e’ opens it for editing anyway… but it opens in VI and I am too stupid / lazy / in a rush to use VI.

Solution: The -e switch makes the file open in whatever the default editor for the environment is. To override this, pass the EDITOR environment var to the command when it’s run:

sudo env EDITOR=nano crontab -e

No comments:

Post a Comment