Name

diff

Synopsis

diff  
 [ -k kflag ]  
 [ -l | -R ]  [ format ]  
 [ [ -r rev1 | -D date1 ] [ -r rev2 | -D date2 ] ]
 [ file ... ]

Compare two versions of a file and display the differences in a format determined by the options. By default, the sandbox version of the file is compared to the repository version it was originally copied from.

The standard meanings of the common client options -D, -k, -l, -r, and -R apply. All options for the diff command can also be used.

Get Linux in a Nutshell, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.