display current-configuration diff

Use display current-configuration diff to display the differences that the running configuration has as compared with the next-startup configuration.

Syntax

display current-configuration diff

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Examples

# Display the differences that the running configuration has as compared with the next-startup configuration.

<TEST1>display current-configuration diff
--- Startup configuration
+++ Current configuration
@@ -6,7 +6,7 @@
#
  stp global enable
 #
- sysname TEST
+ sysname TEST1
 #
  telnet server enable
 #

Table 18: Command output

Field

Description

- - - A

+++ B

  • A displays the source configuration for comparison, which can be Startup configuration, Current configuration, or the name of the source configuration file with its directory information.

  • B displays the destination configuration for comparison, which can be Current configuration, Startup configuration, or the name of the target configuration file with its directory information.

In this example, the startup configuration and the current configuration are the source and target, respectively.

@@ -linenumber1,number1 +linenumber2,number2 @@

Location information for identifying the command line differences:

  • -linenumber1,number1—Source configuration section that contains differences. The linenumber1 argument represents the start line of the section. The number1 argument represents the number of lines between the start line and the end line of the section.

  • +linenumber2,number2—Target configuration section that contains differences. The linenumber2 argument represents the start line of the section. The number2 argument represents the number of lines between the start line and the end line of the section.

cmd1

- cmd2

+ cmd3

cmd4

Displays command differences.

  • cmd1 and cmd4—Command lines are contained in both source and target configurations if they are not prefixed with a minus (-) or plus (+) sign. They provide a context for locating command line differences.

  • - cmd2—Command lines are prefixed with a minus sign if they are contained in the source configuration but not in the target configuration.

  • + cmd3—Command lines are prefixed with a plus sign if they are contained in the target configuration but not in the source configuration.

Related commands

display current-configuration

display diff

display saved-configuration