Linux Desk Reference (2nd Edition)

Introduction

The commands in this section operate on the contents of files, usually text files. In most cases they are capable of including, or excluding, patterns, as specified by regular expressions. See the chapter on "Finding Stuff" for more information about regular expressions.

The dash character, "-", is usually used to specify standard input as one of the input files.

comm

Compare 2 sorted files. (This command outputs common lines.)

cmp

Compare 2 files, usually binaries.

diff

Show the difference between 2 files.

diff3

Show the differences between 3 files.

sdiff

Merge 2 files.

Категории