May 19, 2012, 4:02 am GMT  

Postings

Cron / Crontab – disable e-mail notifications

There are 2 ways to prevent cron to send out e-mail notifications after jobs are run:

  1. Ensure there are no output from the script(s) being run by sending the output to /dev/null
    Simply append one of the following directives to the end of your script.

    >/dev/null 2>&1.

    OR

    &> /dev/null

    Your crontab would now look something like:

    0 1 5 10 * /path/to/script.sh >/dev/null 2>&1

    OR

    0 1 5 10 * /path/to/script.sh &> /dev/null

  2. (more…)

Filed under: cli-fu — appgirl @ 7:43 am
Comments (0)

‘vi’ quick command references

I’m a die hard vi user and still prefer using vi to edit plaintext files. There were some discussion on twitter on vi awhile back and I thought I’d share my own command cheat sheet for vi in edit mode. This is not quite a full tutorial but makes for a useful reference.

Editing Text…

i Insert before cursor
I Insert before line
a Append after cursor
A Append after line
o Open a new line after current line
O Open a new line before current line
r Replace one character
R Replace many characters
x Delete character to the right of cursor
X Delete character to the left of cursor
D Delete to the end of the line
dd Delete current line
:d Delete current line
yy Yank the current line
p Put after the position or after the line
J Join lines
u Undo last change

Moving the cursor around… (more…)

Filed under: cli-fu — appgirl @ 5:21 pm
Comments (0)
« Newer Posts

My Tweets

Fans

AppGirl on Facebook

See What I'm Uncorking

Powered by WordPress