Skip to Main Content
Linux Pocket Guide
book

Linux Pocket Guide

by Daniel J. Barrett
February 2004
Beginner content levelBeginner
200 pages
5h 40m
English
O'Reilly Media, Inc.
Content preview from Linux Pocket Guide

File Comparison

diff

Line-by-line comparison of two files or directories

comm

Line-by-line comparison of two sorted files

cmp

Byte-by-byte comparison of two files

md5sum

Compute a checksum of the given files (MD5)

There are three ways to compare Linux files:

  • Line by line (diff, diff3, sdiff, comm), best suited to text files

  • Byte by byte (cmp), often used for binary files

  • By comparing checksums (md5sum, sum, cksum)

These programs are all text-based. For a graphical file-comparison tool, try xxdiff at http://xxdiff.sourceforge.net.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Pocket Guide, 2nd Edition

Linux Pocket Guide, 2nd Edition

Daniel J. Barrett
Linux in a Nutshell, 6th Edition

Linux in a Nutshell, 6th Edition

Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins

Publisher Resources

ISBN: 9780596806347Errata Page