oreilly.comSafari Books Online.Conferences.


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.


sdiff -o outfile [options] from to

Find differences between the two files from and to and merge interactively, writing the results to outfile.



Treat remaining options as filenames, even if they begin with -.

-a, --text

Treat all files as text and compare line by line.

-b, --ignore-space-change

Ignore differences in whitespace.

-B, --ignore-blank-lines

Ignore added or missing blank lines.

-d, --minimal

Use a different algorithm to find fewer changes. This option causes sdiff to run more slowly.

-H, --speed-large-files

Heuristically speed comparison of large files with many small scattered changes.

-i, --ignore-case

Ignore case changes.

-I regexp, --ignore-matching-lines=regexp

Ignore any changes that insert or delete lines matching the regular expression regexp.


Ignore whitespace when comparing lines.

-l, --left-column

Print only the left column of common lines.

-o file, --output=file

Write merged output to the specified file.

-s, --suppress-common-lines

Suppress common lines.

-t, --expand-tabs

Convert tabs to spaces in the output to preserve alignment.

-v, --version

Print version information and exit.

-w cols, --width=cols

Set the output to cols columns wide.


Ignore horizontal whitespace when comparing lines.

Interactive commands


Edit, then use both versions, with a header for each.


Edit, then use both versions.


Edit, then use the left version.


Edit, then use the right version.


Edit a new version to replace the others.


Display a list of these commands.


Use the left version.


Use the right version.


Silently include common lines.


Verbosely include common lines.



Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: