16.05.2015 Views

Working with the Unix OS

Working with the Unix OS

Working with the Unix OS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introduction to <strong>Unix</strong><br />

! Communications<br />

$ mail send and receive mail<br />

$ write signal o<strong>the</strong>r users<br />

VI Editing<br />

Entering vi<br />

$ vi filename<br />

Command Mode<br />

! Help<br />

^A display help screen<br />

(: !cat .vihelp^M)<br />

! Moving cursor<br />

h move left a character b back a word<br />

j move down a character ^F forward a screen<br />

k move up a character ^B backward a screen<br />

l move right w forward a word<br />

! Deleting Text<br />

x delete character at cursor dd delete a line<br />

! Replace Text<br />

r replace a character R enter REPLACE MODE<br />

! Inserting Text<br />

i INPUT MODE before cursor o INPUT MODE line below<br />

a INPUT MODE after cursor O INPUT MODE line above<br />

! Control of Changes<br />

u undo last change U restore current line<br />

. repeat last change<br />

! Moving Text<br />

Y yank line into buffer<br />

p put buffer line below P put buffer line above<br />

! O<strong>the</strong>r commands<br />

J join <strong>with</strong> next line<br />

^G line number information<br />

- toggle case<br />

! Searching<br />

/text^M search for next occurrence of text string<br />

?text^M search for previous occurrence of text string<br />

n repeat last search command<br />

N scan in opposite direction<br />

! Saving and Leaving vi<br />

:w^M write (update) file<br />

:wq^M update and exit file<br />

:q!^M quit <strong>with</strong>out update<br />

Input or Replace mode<br />

! Input Editing<br />

16

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

Saved successfully!

Ooh no, something went wrong!