From Isaac Sukin Command-line tip: replace a word in all files in a directory:
grep -lr --exclude-dir=".git" -e "oldword" . | xargs sed -i '' -e 's/oldword/newword/g'
VI:
Why I love VIM
cronjob: write to file:
0 8 * * * /usr/local/bin/myjob > /var/log/myjob.log 2>&1