How Do I Use vi

Opening a File

vi -R filename.txt

Searching

/string - searches for string

?string - searches up in a file for string

n - next instance of string

N - previous instance of string

Last line

G - takes you to the last line of a file

Quiting

:q! - quits without saving

0 Comments

Add your comment

E-Mail me when someone replies to this comment