diff [Command]

Command diff

diff command shows the differences between two text files (or all files with the same names in two different directories).

Syntax

diff [options] first_file a second_file

Options

-a Treat all files as text, even if it is not.
-b ignores blank lines and the sequence gaps.
-c generates the output in another format.
-d is trying to find a minimal set of changes (this is significantly slows down the diff).
-e generates a script editor ed to convert the file first_file in second_file.
-f generates output similar to -e, but in reverse order.
-i ignores case of characters.
-l sends the output through pr to pagination.
-n like -f, but counts the number of changed lines.
-r recursively compare files with same name in all subdirectories.
-s said that the files are identical.
-t replaces in the output tabs to spaces.
-u uses the unified output format.
-v displays the version of diff.
-w when comparing strings ignores spaces and tabs.

Description

The diff command compares files first_file and second_file and displays different line.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.