0
0
Linux CLIscripting~10 mins

tail -f for live log monitoring in Linux CLI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to continuously watch the end of a log file named app.log.

Linux CLI
tail [1] app.log
Drag options to blanks, or click blank then click option'
A-f
B-c
C-n
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Using -n shows last lines but does not follow live updates.
Using -c shows bytes, not lines.
Using -v is for verbose output, not live monitoring.
2fill in blank
medium

Complete the command to follow server.log and show the last 20 lines initially.

Linux CLI
tail [1] 20 -f server.log
Drag options to blanks, or click blank then click option'
A-n
B-c
C-v
D-q
Attempts:
3 left
💡 Hint
Common Mistakes
Using -c shows bytes, not lines.
Using -v or -q do not control line count.
3fill in blank
hard

Fix the error in the command to follow error.log live: tail -n -f 10 error.log. Place the correct option to make it work.

Linux CLI
tail [1] 10 error.log
Drag options to blanks, or click blank then click option'
A-n
B-n -f
C-f -n
D-f
Attempts:
3 left
💡 Hint
Common Mistakes
Putting -n before -f without a number causes errors.
Using only -f shows last 10 lines by default, but here 10 lines are requested.
4fill in blank
hard

Fill both blanks to create a command that follows access.log and shows the last 50 lines initially.

Linux CLI
tail [1] [2] -f access.log
Drag options to blanks, or click blank then click option'
A-f
B-n
C50
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the number before the option.
Using -v which does not control lines or following.
5fill in blank
hard

Fill all three blanks to create a command that follows debug.log, shows last 30 lines, and uses verbose output.

Linux CLI
tail [1] [2] [3] -f debug.log
Drag options to blanks, or click blank then click option'
A-f
B-n
C30
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the verbose option.
Placing the number before the -n option.