27.12.2012 Views

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1. Input mode - the Insert key, i, o (add a line below), O (add a line above) and other<br />

commands put you in this mode. When you are in this mode you will see the text<br />

--INSERT-- in the last line.<br />

2. Command mode - 'Esc' gets you out of input mode and into command mode<br />

i brings you back to input mode<br />

dd deletes a line and puts it in the buffer<br />

dd delete lines<br />

x delete a character<br />

dw delete a word<br />

p add the buffer past the current location<br />

P add the buffer be<strong>for</strong>e the current location<br />

o add a line and go into insert mode<br />

/string - search <strong>for</strong> string<br />

n do the last command again (this can be powerful)<br />

jkl; cursor movement<br />

A add text at the end of the line<br />

G go to line <br />

G go to the last line in the file<br />

yy yank a line (copy into buffer)<br />

yy yank n lines<br />

3. Command line mode - pressing the colon : key brings you to this mode<br />

:wq save (write & quit)<br />

:q! quit and discard changes<br />

: go to line number <br />

:r read into the current file<br />

:1,$s/old/new/g globally replace with <br />

:help give help<br />

242 <strong>The</strong> <strong>Virtualization</strong> <strong>Cookbook</strong> <strong>for</strong> RHEL 6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!