A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.gnu.org/software/diffutils/manual/html_node/Invoking-diff.html below:

Invoking diff (Comparing and Merging Files)

Next: Invoking diff3, Previous: Invoking cmp, Up: Comparing and Merging Files   [Contents][Index]

13 Invoking diff

The format for running the diff command is:

In the simplest case, two file names from-file and to-file are given, and diff compares the contents of from-file and to-file. A file name of - stands for the standard input.

If one file is a directory and the other is not, diff compares the file in the directory whose name is that of the non-directory. The non-directory file must not be -.

If two file names are given and both are directories, diff compares corresponding files in both directories, in alphabetical order; this comparison is not recursive unless the --recursive (-r) option is given. diff never compares the actual contents of a directory as if it were a file. The file that is fully specified may not be standard input, because standard input is nameless and the notion of “file with the same name” does not apply.

If the --from-file=file option is given, the number of file names is arbitrary, and file is compared to each named file. Similarly, if the --to-file=file option is given, each named file is compared to file.

diff options begin with ‘-’, so normally file names may not begin with ‘-’. However, -- as an argument by itself treats the remaining arguments as file names even if they begin with ‘-’.

An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4