CentOS Linux Server Guide

Vi Editor - Searching words, sentences , string using keyboard

Before performing any search operation, you must first make sure that you are in command mode.
Keyboard  Operation
/string  search from the cursor position to end of the file, forward search
?string  search from the current position backwards to beginning of the file, backward search
n  repeating  search

 

Example

In the following example, we are searching the word  'error' until matched and the result will be highlighed.
/error

 

Read more on Visual Editor (VI)



Copyright 2011 http://www.1a-centosserver.com All Rights Reserved

All trademarks are the property of their respective owners.

Contact Us | Terms of Use | Privacy Policy