Skip to content

Instantly share code, notes, and snippets.

@samuelwilliams
Forked from glnds/less-cheatsheet.md
Created January 29, 2020 02:33
Show Gist options
  • Save samuelwilliams/9f184c6bc1e5cb1f40dd1f221beb1994 to your computer and use it in GitHub Desktop.
Save samuelwilliams/9f184c6bc1e5cb1f40dd1f221beb1994 to your computer and use it in GitHub Desktop.
Less Cheatsheet

Less Cheatsheet

less {filename}
Navigation
SPACE forward one window
b backward one window
d forward half window
u backward half window
j navigate forward by one line
10j 10 lines forward.
k navigate backward by one line
10k 10 lines backward.
G go to the end of file
g go to the start of file
q or ZZ exit the less pager
Search
/ search for a pattern which will take you to the next occurrence.
? search for a pattern which will take you to the previous occurrence.
n for next match in forward
N for previous match in backward
Other
F simulate tail -f inside less pager
ma mark the current position with the letter ‘a’,
‘a go to the marked position ‘a’.
&pattern display only the matching lines, not all.
v using the configured editor edit the current file.
CTRL+G show the current file name along with line, byte and percentage statistics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment