opendiff
From Mac Guides
|
This tip requires |
opendiff is a Terminal command used to invoke FileMerge for the specified files (or directories) from the command line.
[edit]
Examples
To display the difference between two files:
opendiff file1.txt file2.txt
To display the difference between two files, saving the output:
opendiff file1.txt file2.txt -merge newfile.txt
To display the differences between two entire directories
opendiff dir1 dir2
[edit]
Man Page Excerpt
opendiff is a command line utility that provides a convenient way to launch the FileMerge application from Terminal to graphically compare files or directories. If FileMerge is already running, opendiff will connect to that running instance for the new comparison. opendiff exits immediately after the comparison request has been sent to FileMerge.
[edit]

