1. Open a logs file in VI
root@doc16:/logs# vi logs.txt (vi
3. To reach the end of file
Type G (Upper case)
4. To move forward by a page
Cntrl + F
5. To Move backwards by a page
Cntrl + B
6. Quit vi
:q
7. Search
/string search forward for occurrence of string in text
?string search backward for occurrence of string in text
n move to next occurrence of search string
N move to next occurrence of search string in opposite
direction
:u
9. Quit vi editor without saving any changes
Press Escape key to change from insert or append mode
:q!
10. To go to the end of the current line
$
11. To start search from the last line
?(Search string)
No comments:
Post a Comment