LinuxGuide.it > Linux Man Page: "sdiff"

 

 
Search with Google

 

The Linux Documentation Project maintains an archive of snaphots of the (English language) core Linux manual pages that are maintained by Michael Kerrisk. Corrections and additions are welcome, but review the "Help Wanted" list, first.

Man pages belonging to programs are usually distributed together with those programs. Therefore, the core Linux man-pages mainly contains the pages for system calls and library routines, special devices, and file formats. However, it also contains documentation for a few programs, in cases where the authors or maintainers of the program do not distribute man pages themselves.

This page is part of release 3.11 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages

 

man page(1) manual page Table of Contents

Name

sdiff - find differences between two files and merge interactively

Synopsis

sdiff -o outfile [options] from-file to-file

Description

The sdiff command merges two files and interactively outputs the results to outfile.

If from-file is a directory and to-file is not, sdiff compares the file in from-file whose file name is that of to-file, and vice versa. from_file and to-file may not both be directories.

sdiff options begin with -, so normally from-file and to-file may not begin with -. However, -- as an argument by itself treats the remaining arguments as file names even if they begin with -. You may not use - as an input file.

sdiff without -o (or --output) produces a side-by-side difference. This usage is obsolete; use diff --side-by-side instead.

Options
Below is a summary of all of the options that GNU sdiff accepts. Each option has two equivalent names, one of which is a single letter preceded by -, and the other of which is a long name preceded by --. Multiple single letter options (unless they take an argument) can be combined into a single command line argument. Long named options can be abbreviated to any unique prefix of their name.

-a
Treat all files as text and compare them line-by-line, even if they do not appear to be text.

-b
Ignore changes in amount of white space.

-B
Ignore changes that just insert or delete blank lines.

-d
Change the algorithm to perhaps find a smaller set of changes. This makes sdiff slower (sometimes much slower).

-H
Use heuristics to speed handling of large files that have numerous scattered small changes.

--expand-tabs
Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files.

-i
Ignore changes in case; consider upper- and lower-case to be the same.

-I regexp
Ignore changes that just insert or delete lines that match reg_exp.

--ignore-all-space
Ignore white space when comparing lines.

--ignore-blank-lines
Ignore changes that just insert or delete blank lines.

--ignore-case
Ignore changes in case; consider upper- and lower-case to be the same.

--ignore-matching-lines=regexp
Ignore changes that just insert or delete lines that match reg_exp.

--ignore-space-change
Ignore changes in amount of white space.

-l
--left-column Print only the left column of two common lines.

--minimal
Change the algorithm to perhaps find a smaller set of changes. This makes sdiff slower (sometimes much slower).

-o file
--output=file Put merged output into file. This option is required for merging.

-s
--suppress-common-lines Do not print common lines.

--speed-large-files
Use heuristics to speed handling of large files that have numerous scattered small changes.

-t
Expand tabs to spaces in the output, to preserve the alignment of tabs in the input files.

--text Treat
all files as text and compare them line-by-line, even if they do not appear to be text.

-v
--version Output the version number of sdiff.

-w columns
--width=columns Use an output width of columns. Note that for historical reasons, this option is -W in diff, -w in sdiff.

-W
Ignore horizontal white space when comparing lines. Note that for historical reasons, this option is -w in diff, -W in sdiff.

See Also

cmp(1) , comm(1) , diff(1) , diff3(1) .

Diagnostics

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


Table of Contents

use open software!