Cis 155 Unix

Topics: Unix, C, Unix-like Pages: 3 (535 words) Published: March 3, 2013
CIS 155 Unix Operating System

Homework 2

Vi Editor Cursor Movement

h j k l

h j k l

+, - First character of next, previous Line

forward word: w
back word: b
end of word: e
start of line: ^,0
end of line: $
start of file: gg,:1<Enter>,1G
end of file: G
go to line nn: :nn<Enter>,nnG

use ESC to switch between Input and Command mode

* i: insert before the cursor
* I: insert text in the beginning
* a: append after the cursor
* A: append to the end
* o: open a line below the current line
* O: open a line above the current line

To exit do one of the following:
“:wq” write and quit.
“:q” quit without save.
“:q!” quit, this is needed if you modify the text and do not want to save the file. “ZZ” quick save.

Helpful notes on : delete, set the line number, undo change:

dd,2dd,3dd,… to delete one line, two lines or three lines. “:set nu” is to display line numbers.
“u” is to undo changes.
“.” is to repeat the last action.
“x” deletes one single character.
To copy 10 lines, type “10yy” and put the cursor at the place where you want to have the lines and enter “p”.


Do the following:

1: log into your Unix User Session
2: Go to your assignment directory
3: Create new directory called Letter
4: Create text file using vi editor with the following contents:


UNIX is a computer operating system originally developed in the 1960s and 1970s by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie, and Douglas McIlroy. Today's Unix systems are split into various branches, developed over time by AT&T, as well as various commercial vendors and non-profit organizations. The present owner of the trademark UNIX is The Open Group, an...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Unix Essay
  • Unix Essay
  • Unix Essay
  • Essay on Demise of Unix
  • The Past , Present, and Future of Unix Essay
  • Definition of Unix and History Essay
  • History Of Unix Essay
  • Essay on Difference Between Unix and Linux

Become a StudyMode Member

Sign Up - It's Free