Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

| (pipe)

Syntax

Description

Filter the output of an operational mode or a configuration mode command.

Options

append filename

Append the output to a file.

compare (filename | rollback n )

Compare configuration changes with another configuration file. In operational mode, use the show configuration command. In configuration mode, use the show command.

compare | display xml

Compare configuration changes with the active configuration and display them in XML format. In operational mode, use the show configuration command. In configuration mode, use the show command.

count

Display the number of lines in the output.

display

Display additional information about the configuration contents.

changed

Tag changes with junos:changed attribute (XML only).

commit-scripts

(Configuration mode only) Display all statements that are in a configuration, including statements that were generated by transient changes.

detail

(Configuration mode only) Display configuration data detail.

genstate (subscription-paths | yang-module-name)

Display information about the genstate data model for the given show command.

  • subscription-paths—Display all resource paths available for subscription in the genstate YANG module associated with the given command. The same genstate module can include data for multiple related commands.

  • yang-module-name—Display the name of the genstate YANG module that includes the data model and resource paths for that command.

inheritance <brief | default | no-comments |groups | terse>

(Configuration mode only) Display inherited configuration data and source group.

json

Display the output for operational commands and configuration data in JavaScript Object Notation (JSON) format.

merge

Use with the show ephemeral-configuration command to display the merged view of the static and ephemeral configuration databases in Junos OS Release 18.1 and earlier releases. Issuing the show ephemeral-configuration | display merge command displays the configuration data from all instances of the ephemeral configuration database merged with the complete post-inheritance configuration.

Starting in Junos OS Release 18.2R1, to display the merged view of the static and ephemeral configuration databases, use the show ephemeral-configuration merge command instead.

omit

(Configuration mode only) Display configuration statements omitted by the apply-flags omit configuration statement.

set

Display the configuration as a series of configuration mode commands required to re-create the configuration.

translation-scripts

Display the configuration with YANG translation scripts applied.

To view the complete post-inheritance configuration with the translated configuration data from all enabled YANG translation scripts included in the output, append the | display translation-scripts filter to the show configuration command in operational mode or the show command in configuration mode.

You can also append one of several keywords to display different views of the configuration data corresponding to the non-native YANG data models:

  • configured-delta—In configuration mode, compare the candidate and active configurations, and display configuration changes in the statements or hierarchies corresponding to non-native YANG data models before any translation is applied. The XML output displays the deleted content, followed by the new content in the syntax defined by the YANG data model.

  • translated-config—In operational or configuration mode, display all non-native configuration data present in the committed or candidate configuration, respectively, after processing by all enabled translation scripts into Junos OS syntax.

  • translated-delta—In configuration mode, compare the candidate and active configurations, and display configuration changes in the statements or hierarchies corresponding to non-native YANG data models after translation is applied. The XML output displays the deleted content, followed by the new content in Junos OS syntax.

xml (<genstate-path> | <groups> <interface-ranges> <no-export-path> | <rpc <response-paths>> | <xpath>)

(Operational mode only) Display the command output as Junos XML tags. You can add the following options to filter for different information in the XML output:

  • genstate-path—In operational command output, include the junos:genstate-path attribute for every emitted tag that is available for subscription. The attribute value is the genstate path that a gNMI telemetry collector can subscribe to for the corresponding state data.

  • groups—In configuration data, display the junos:group attribute in inherited data to indicate the source configuration group.

  • interface-ranges—In configuration data, display the junos:interface-range attribute in inherited data to indicate the source interface range.

  • no-export-path—Display the XML tags only for the specific configuration hierarchy level you are viewing and omit any parent-level tags.

  • rpc—Display the Junos XML RPC that corresponds to the given operational mode command.

  • rpc response-paths—List all possible response paths under the corresponding RPC's top-level response tag. The same response tag can include paths for multiple related commands.

  • xpath—In operational command output, include the junos:data-xpath attribute for each tag. The attribute value is the XPath expression that selects that specific node.

except pattern

Ignore text matching a regular expression when searching the output. If the regular expression contains spaces, operators, or wildcard characters, enclose it in quotation marks.

find pattern

Display the output starting at the first occurrence of text matching a regular expression. If the regular expression contains spaces, operators, or wildcard characters, enclose it in quotation marks (" ").

hold

Hold text without exiting the --More-- prompt.

last lines

Display the last number of lines you want to view from the end of the configuration. However, when the number of lines requested is less than the number of lines that the screen length setting permits you to display, Junos returns as many lines as permitted by the screen length setting.

match pattern

Search for text matching a regular expression. If the regular expression contains spaces, operators, or wildcard characters, enclose it in quotation marks.

no-more

Display output all at once rather than one screen at a time.

resolve

(Operational mode only) Convert IP addresses into Domain Name System (DNS) names. Truncates to fit original size unless full-names is specified. To prevent the names from being truncated, use the full-names option.

refresh interval

Refresh the display of the command according to the interval specified. The screen gets refreshed periodically to show you the current output of the command until you quit the command. The default refresh interval is one second. However, you can also explicitly specify a value from 1 through 604800 for the refresh interval.

request message (all | account@terminal )

Display command output on the terminal of a specific user logged in to your router, or on the terminals of all users logged in to your router.

save filename

Save the output to a file or URL.

tee

Allows you to both display the command output on screen and write it to a file. Unlike the UNIX tee command, if the file cannot be opened, just an error message is displayed.

trim columns

Trim specified number of columns from the start line. Only positive values are accepted. An error message appears if a negative value is given.

Required Privilege Level

view

Release Information

Command introduced before Junos OS Release 7.4.

display commit-scripts option added in Junos OS Release 7.4.

tee option added in Junos OS Release 14.1.

display json option added in Junos OS Release 14.2.

compare | display xml option added in Junos OS Release 15.1.

display translation-scripts option added in Junos OS Release 16.1.

display merge option added in Junos OS Release 16.2R2.

display merge option deprecated in Junos OS Release 18.2R1.

display genstate (subscription-paths | yang-module-name) option added in Junos OS Release 26.2R1 and Junos OS Evolved Release 26.2R1.

display xml genstate-path option added in Junos OS Release 26.2R1 and Junos OS Evolved Release 26.2R1.

display xml rpc response-paths option added in Junos OS Release 26.2R1 and Junos OS Evolved Release 26.2R1.

display xml xpath option added in Junos OS Release 26.2R1 and Junos OS Evolved Release 26.2R1.