tldr/pages/common/less.md

32 lines
463 B
Markdown
Raw Normal View History

2013-12-08 08:56:16 +00:00
# less
> Open a file for interactive reading, allowing scrolling and search.
2013-12-08 08:56:16 +00:00
- Open a file:
2013-12-08 08:56:16 +00:00
`less {{source_file}}`
2013-12-08 08:56:16 +00:00
- Page up / down:
2013-12-08 08:56:16 +00:00
`<Space> (next), b (previous)`
2013-12-08 08:56:16 +00:00
- Go to start / end of file:
2013-12-08 08:56:16 +00:00
`g (start), G (end)`
- Forward search for a string:
2013-12-08 08:56:16 +00:00
`/{{something}} then n (next), N (previous)`
2013-12-08 08:56:16 +00:00
- Backward search for a string:
`?{{something}} then n (next), N (previous)`
- Enable output of ANSI colors:
`git diff --color | less -R`
- Exit:
2013-12-08 08:56:16 +00:00
`q`