Forrest logo
back to the comp tool

comp:tldr:43c5e

comp: Display line numbers for differences.
$ comp /l ${path\to\file1} ${path\to\file2}
try on your machine

The command "comp /l ${path\to\file1} ${path\to\file2}" is used to compare the contents of two files and display the differences in a specific format.

Here is a breakdown of the command:

  • "comp" is the command keyword used for file comparison.
  • "/l" is an option that tells the command to only show the differences in a brief format, without displaying the actual different lines.
  • "${path\to\file1}" represents the file path of the first file that needs to be compared.
  • "${path\to\file2}" represents the file path of the second file that needs to be compared.

When you execute this command, it will compare the contents of "file1" and "file2" and display the differences in a brief format, without showing the specific lines that differ.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the comp tool