The table below shows some shortcut keys for Unix-like editor such as vi and less:
Command | Description |
?<pattern to search> | |
/<string to find> | |
n | Show next occurrence of searched string/pattern |
shift+n | Show previous occurrence of searched string/pattern |
g | Beginning of the document |
Shift+g | End of the document |
j | Navigate forward by one line |
k | Navigate backward by one line |
Shift+f | Enter into “tail –f” mode, waiting for data |
Ctrl+c | Exit waiting for data mode |
&<pattern to search> | show only lines matching the pattern |