| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
38.10 File Comparison with Dired
Here are two Dired commands that compare specified files using
diff. They show the output in a buffer using Diff mode
(see section Comparing Files).
- =
-
Compare the current file (the file at point) with another file (the file at the mark) using the
diffprogram (dired-diff). The file at the mark is the first argument ofdiff, and the file at point is the second argument. This refers to the ordinary Emacs mark, not Dired marks; use C-<SPC> (set-mark-command) to set the mark at the first file's line (see section Setting the Mark). - M-=
Compare the current file with its latest backup file (
dired-backup-diff). If the current file is itself a backup, compare it with the file it is a backup of; this way, you can compare a file with any one of its backups.The backup file is the first file given to
diff.
