Challenge - 5 Problems
Pager Pro
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Output of 'less' command with a specific key press
You run
less on a text file with 100 lines. After opening, you press the spacebar key once. What happens?Linux CLI
less sample.txt
Attempts:
2 left
💡 Hint
Think about how 'less' paginates content and what the spacebar does.
✗ Incorrect
In 'less', pressing the spacebar moves the view forward by one full screen of text, allowing you to read the next chunk.
💻 Command Output
intermediate2:00remaining
Behavior of 'more' when reaching end of file
You use the command
more sample.txt to view a file. When you reach the end of the file, what does 'more' do?Linux CLI
more sample.txt
Attempts:
2 left
💡 Hint
Consider what happens when you reach the end of content in pagers.
✗ Incorrect
'more' exits automatically when it reaches the end of the file, returning control to the shell.
📝 Syntax
advanced2:00remaining
Correct command to search forward in 'less'
Which command inside 'less' allows you to search forward for the word 'error'?
Linux CLI
less /var/log/syslog
Attempts:
2 left
💡 Hint
Think about how forward and backward searches differ in 'less'.
✗ Incorrect
In 'less', typing '/' followed by a pattern searches forward, while '?' searches backward.
💻 Command Output
advanced2:00remaining
Output of 'more' with piped input
You run the command
cat file.txt | more. What is the behavior of 'more' in this case?Linux CLI
cat file.txt | more
Attempts:
2 left
💡 Hint
Consider how 'more' handles standard input from pipes.
✗ Incorrect
'more' can paginate piped input, showing one screen at a time.
🚀 Application
expert3:00remaining
Combining 'less' with environment variable for default options
You want 'less' to always start with line numbers shown and ignore case in searches. Which environment variable setting achieves this?
Attempts:
2 left
💡 Hint
Check 'less' man page for option meanings: -N shows line numbers, -i ignores case.
✗ Incorrect
The '-N' option shows line numbers, and '-i' makes searches case-insensitive. Both are uppercase/lowercase sensitive.