Courseiva
User Interfaces →easyMultiple Choice

JN0-106 User Interfaces Practice Question

A junior network engineer is learning JunOS CLI and wants to view the last 10 lines of the system log file. They log into the device and type 'show log messages | last 10'. They receive an error: 'unknown pipe command'. Which pipe command should they use instead?

⚠ Common exam trap

The trap here is that candidates familiar with Cisco IOS may expect '| last 10' to work, but JunOS uses Unix-style pipe commands where 'tail' is the correct filter for displaying the end of output.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

| tail 10

In JunOS CLI, the pipe command to display the last N lines of output is '| tail N', not '| last N'. The 'tail' command filters the output to show only the final lines, analogous to the Unix 'tail' utility. Option D is correct because '| tail 10' will show the last 10 lines of the system log file.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    | last 10

    Why it's wrong here

    Junos CLI does not support a pipe filter named 'last' for selecting trailing lines. The correct pipe command for that purpose is 'tail'. Entering '| last 10' results in a syntax error because 'last' is not recognized as a valid operational or configuration mode pipe modifier.

  • ✗

    | display 10

    Why it's wrong here

    The 'display' pipe option is used to alter output format, such as 'display set', 'display detail', or 'display xml', but it does not accept a numeric argument and never truncates to a specified number of lines. Thus '| display 10' neither shows last 10 lines nor produces valid output; it fails because 'display' expects a format keyword, not an integer.

  • ✗

    | head 10

    Why it's wrong here

    The 'head' pipe command in Junos prints the first N lines of command output. Since the engineer specifically wants the last 10 lines, 'head 10' would show the beginning of the output and omit the most recent or final entries, making it incorrect even though it is a valid pipe command.

  • ✓

    | tail 10

    Why this is correct

    The 'tail' pipe command in Junos CLI displays the last N lines of the output buffer. Appending '| tail 10' to a show command returns the final 10 lines, which is exactly what the engineer needs to view the most recent information. This is a standard Junos pipe filter for limiting output to the end of the result.

About these practice questions

One of 326 original JN0-106 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This JN0-106 practice question is part of Courseiva's free Juniper Networks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the JN0-106 exam.