DELAPARRA
Index
Color
NL
Category: CLI commands

less

Explained by Updated

What is less?

less: Less — View a file page by page — press q to quit, / to search. less shows a file one screen at a time. You scroll with the arrow keys or space bar, search with /, jump to the end with G, and quit with q. Unlike an editor, it does not load the whole file at once, so it opens multi-gigabyte log files instantly. It is also the pager behind man, git log and git diff.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about less

What should you keep in mind with less?

A few options help with logs. less +F file follows new lines like tail -f; press Ctrl+C to stop following and scroll, and F to resume. -S stops long lines from wrapping, which keeps wide logs readable, and -N shows line numbers. Because less cannot change the file, it is a safe way to inspect configuration and logs on a production server.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with L

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.