Recall & Review
beginner
What is the main purpose of the
less command in Linux?The
less command lets you view text files one screen at a time. It allows you to scroll forward and backward through the file easily.Click to reveal answer
beginner
How does
more differ from less in terms of navigation?more only allows forward navigation through a file, while less lets you move both forward and backward.Click to reveal answer
beginner
Which key do you press to quit
less or more?Press the q key to quit and exit the
less or more viewer.Click to reveal answer
intermediate
How can you search for a word inside a file when using
less?Type / followed by the word you want to find, then press Enter. Use n to go to the next match.
Click to reveal answer
intermediate
What happens if you run
cat filename | less?It sends the output of
cat filename into less, letting you view the file page by page instead of all at once.Click to reveal answer
Which command allows backward scrolling through a file?
✗ Incorrect
less supports both forward and backward scrolling, unlike more.What key do you press to exit
more or less?✗ Incorrect
Pressing q cleanly exits the pager.
How do you search for a word inside
less?✗ Incorrect
Typing /word starts a forward search in
less.Which command only allows forward scrolling?
✗ Incorrect
more only supports forward scrolling.What does
cat file | less do?✗ Incorrect
It pipes the file content into
less for easy reading.Explain how you would use
less to view a long log file and search for a specific error message.Think about opening, searching, navigating, and exiting.
You got /4 concepts.
Describe the differences between
less and more commands and when you might prefer one over the other.Focus on navigation and features.
You got /4 concepts.