Here is the behaviour im seeing:
A short description is that when i type man bash | less, i need to type
::100instead of
:100in order to move to line 100.
I've tried googling it but couldnt really come up with sane search terms and it yielded nothihng.
Any ideas ?
My version of less is:
less 487 (POSIX regular expressions) 1 1 Answer
Just to be clear: G means press this key and g means enter this character, so G = Shift+G.
To navigate to a specific line in less, just enter a line number and press G. You don't enter the colon :, e.g. 1+0+0+G to go to line 100.
Entering the same, but pressing Enter instead of G jumps down 100 lines instead. Here are the jumping commands from less --help:
Commands marked with * may be preceded by a number, N. g < ESC-< * Go to first line in file (or line N). G > ESC-> * Go to last line in file (or line N). p % * Go to beginning of file (or N percent into file).Here's a list of possible combinations (for a standard US QWERTY keyboard where <=Shift+,, >=Shift+. and %=Shift+5):
- jump to the first line:
- G or
- Shift+, or
- Esc+Shift+, or
- P or
- Shift+5
- jump to line 8:
- 8+G or
- 8+Shift+, or
- 8+Esc+Shift+, or
- 8+Shift+G or
- 8+Shift+. or
- 8+Esc+Shift+.
- jump 8 lines down:
- 8+Enter
- jump to 8% of the file:
- 8+P or
- 8+Shift+5
- jump to the last line:
- Shift+G or
- Shift+. or
- Esc+Shift+.