nerdexam
Juniper

JN0-102 · Question #346

Which command would allow you to compare two files stored on your router?

The correct answer is B. user@host> file compare files filename1 filename2. The file compare operational command is used in Junos to display the differences between two specified files stored on the router. This command helps in identifying modifications or discrepancies between file versions.

User Interface Options

Question

Which command would allow you to compare two files stored on your router?

Options

  • Auser@host> file show filename1 compare filename2
  • Buser@host> file compare files filename1 filename2
  • Cuser@host> compare files filename1 filename 2
  • Duser@host> compare filename1 filename2

How the community answered

(52 responses)
  • A
    4% (2)
  • B
    92% (48)
  • C
    2% (1)
  • D
    2% (1)

Why each option

The `file compare` operational command is used in Junos to display the differences between two specified files stored on the router. This command helps in identifying modifications or discrepancies between file versions.

Auser@host> file show filename1 compare filename2

The `file show` command displays content, but `compare` is a sub-command of `file`, not an option under `file show`.

Buser@host> file compare files filename1 filename2Correct

The correct Junos operational command to compare two files is `file compare files <filename1> <filename2>`. This command displays the differences between the content of the two specified files.

Cuser@host> compare files filename1 filename 2

The `compare` command alone is used for comparing configuration changes, not arbitrary files, and the syntax `files` is misplaced.

Duser@host> compare filename1 filename2

The `compare` command is used for configuration comparison (e.g., `compare rollback <number>`), not for general file comparison with arbitrary filenames directly.

Concept tested: Comparing files on Junos OS

Source: https://www.juniper.net/documentation/us/en/software/junos/junos-basics/topics/reference/command-summary/file.html

Topics

#file management#Junos CLI#compare files

Community Discussion

No community discussion yet for this question.

Full JN0-102 Practice