Linux – How can I change the default crontab editor cronlinux Can I change the default crontab editor to vi editor? If so, how? Best Answer Most of the time I do something like: # env EDITOR=vi crontab -e or # env VISUAL=vi crontab -e Related SolutionsLinux – Change default crontab editor to nano in FreeBSD For sh based shells: export EDITOR=/path/to/nano For C shell based: setenv EDITOR /path/to/nano Remember that unless you save these setting to your login profile script (/home/user/.bash_profile for example), you lose the setting at log out. If I remember correctly, FreeBSD uses C shell as the default user shell. Linux Bash – How to Sort du -h Output by Size As of GNU coreutils 7.5 released in August 2009, sort allows a -h parameter, which allows numeric suffixes of the kind produced by du -h: du -hs * | sort -h If you are using a sort that does not support -h, you can install GNU Coreutils. E.g. on an older Mac OS X: brew install coreutils du -hs * | gsort -h From sort manual: -h, --human-numeric-sort compare human readable numbers (e.g., 2K 1G) Related TopicLinux – How to save a cronjob on nano editorLinux – How to edit the crontab of another user on the linux serverLinux SCP – Can SCP Copy Directories Recursively?Linux – Change Other Users CrontabCron – How to save and exit crontab -eLinux Cron – Why is My Crontab Not Working and How to Troubleshoot
Best Answer
Most of the time I do something like:
or