diff is a shell command to find differences between two files. It is common on all *nix based systems

learn more… | top users | synonyms

122
votes
8answers
174k views

How do I compare binary files in Linux?

I need to compare two binary files and get the output in the form <fileoffset-hex> <file1-byte-hex> <file2-byte-hex> for every different byte. So if file1.bin is 00 90 00 11 in binary ...
4
votes
4answers
6k views

Rsync print only files that would have been changed

Is there a way to get rsync to print the full filepaths to all files that are different without actually transferring any files? Alternatively, I need a way to diff the files across two trees (over ...
19
votes
4answers
6k views

How can I enable colored output for OSX diff?

I need to diff two files (not two versions of the same file, they are however tracked by git, but that is unrelated) and I would like some colored output, how can I achieve that? $ diff file_1 file_2 ...
5
votes
3answers
1k views

View incremental diffs of my revisions to files using Dropbox

Sometimes I use a simple editor like Notepad++ to edit my webpages on Dropbox. Notepad++, not being an über-editor or IDE, does not track file changes for me. But Dropbox does!! Has anybody ...
2
votes
2answers
106 views

is there a Diff tool for dropbox for Mac?

Is there a dropbox diff tool/app for Mac? So what I mean here in an app that highlights visually the difference between versions in a text file you have on dropbox. It would typically have two ...
0
votes
1answer
266 views

Alternative to diff with progress for massive directory compare?

I just rsync-ed 2,000,000 files (3TB) from one RAID to another. I want to make sure my data is intact. rsync -c takes a really long time. diff doesn't show me what it's doing. Is there an ...
0
votes
1answer
12 views

Why is my patch coming out in binary format?

I'm diffing two directories, 220 and sue, as follows: diff -r 220 sue > diff.txt The directory looks as follows afterwards: $ ls -al total 20 drwxrwx---+ 1 Administrators Domain Users 0 Jun ...
0
votes
1answer
35 views

Monitoring changes in file with bash

I'm running DHCP server on local network which calls this script every few seconds: dumpleases | awk '{print $2}' > leasesnow #get list of all IPs leased in a file, one per line ADDED=`awk ...
0
votes
2answers
302 views

diff ignoring eol and whitespace

I would like to diff two files, such that end of lines and white space be ignored. Namely, I would like diff to find no difference between d1.txt and d2.txt: $ cat d1.txt ...
8
votes
4answers
7k views

Prevent diff from checking for newline at end of file

I have two big trees, which I want to compare. Some of the files in the tree differ just because one has newline at the end, and the other file lacks this newline. I want to ignore this fact. I have ...
9
votes
2answers
4k views

WinMerge and Diffmerge

I prefer Winmerge to Diffmerge. But the one thing I envy is diffmerge's folder diff feature. Diffmerge shows, for complecate folders and subfolders, only different files(not folders). Winmerge shows ...
2
votes
0answers
31 views

How to show differences between two duplicity backups?

I want to be able to see the differences between two duplicity backups. I know there is the command verify but it only lists files which differ from the latest backup. If I try list-current-files with ...
4
votes
5answers
802 views

Difference in whitespace between 2 files on linux

I have 2 files that when I compare with diff show that every line has changed. When I compare them with diff -w (ignoring whitespace) it shows the few minimal changes that I expect. Obviously there ...
4
votes
7answers
2k views

Single line diff [closed]

Is there a diff tool I can run from the command line or maybe just an online webpage that will compare single lines? GitHub diffs do this, but I don't want to publish things to GitHub just to read the ...
5
votes
1answer
1k views

How to diff only the first line of two files?

I want to diff only the first line of two files, as opposed to the entire file. How would I do that? I only need a solution for the the first line, but if you could specify the number of lines that ...
0
votes
2answers
381 views

Why does my busybox diff report 'Common subdirectories' for every file pair?

I am using this version of diff on my Synology NAS to verify a backup: xyz> diff BusyBox v1.16.1 (2014-05-29 11:26:15 CST) multi-call binary. Usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U ...
3
votes
1answer
317 views

file changes — notification and diff

I'm looking for a way to be notified if a text file changes (Windows 7), and be offered a file diff upon such a change. For example, the text editor Notepad++ does part of this, notifying me of an ...
1
vote
1answer
40 views

How can I quickly compare two directories skipping hard linked files that exist in both directories in linux

I have two directories that I would like to compare. The first directory contains an rsync backup of many thousands of folders and files. The second directory contains hard links to all of the files ...
1
vote
0answers
8 views

Is there a diff-buffer-with-file equivalent for Word?

Hitherto I've done all my work in Emacs and have become accustomed to diff-buffer-with-file, which shows changes that are made in the buffer but have not yet been saved. Is there a similar tool within ...
2
votes
2answers
1k views

Remove difference b/w PC and Unix Text in beyond compare

My problem is I'm try to compare two folders which are almost same but some little difference. But when I compare both of the folders then it shows difference in each file. When i open the file its ...
0
votes
1answer
40 views

How to know what are in a file and what aren't in another?

I doing a nrpe check for my nagios about the files that I backup, sending to Amazon S3. I have two files then, s3, which list all my files that are in Amazon already. And local which list all my files ...
1
vote
0answers
24 views

Is it possible to view a tkdiff “report” in tkdiff?

tkdiff has an option to "Write Report" in the File menu, but I couldn't find any way to open the report in tkdiff later, i.e., so I can view the diff graphically again without having to recompute it.
4
votes
2answers
3k views

Use Meld instead of Kompare in KdeSVN

i tried using Meld as external diff in KdeSVN as meld -on - (settings>configure kdesvn>diff&merge) but Meld complains that the usage is wrong: meld: error: no such option: -o Finished Usage: ...
0
votes
0answers
145 views

View the diff between My Version and Server Version of MS Excel file

In Excel 2013 Desktop, I received the following warning: UPLOAD FAILED: We're sorry, someone updated the server copy and it's not possible to upload your changes now. [ Keep My Version ] [ Keep ...
9
votes
5answers
10k views

Is there any free *.diff file viewer? [closed]

Is there any free software that will run on Windows 7 to show syntax highlighting for *.diff files generated from comparing files? I don't want to compare files, just view the highlighted output from ...
1
vote
0answers
19 views

Programantic Diff

I'm localising a piece of Javascript (the github repo is here) for Spanish speaking users. I have both the English and Spanish text as PDFs and I have the software in English. The pdfs look like ...
2
votes
6answers
9k views

Difftool for Ubuntu like OS X's Opendiff [closed]

What is the best difftool for Git repos like OS X's Opendiff?
1
vote
1answer
383 views

Incremental Backups of ntfsclone Images

I am attempting to make compressed incremental backups of a Windows partition using ntfsclone on Linux. Currently, I am making full ntfsclone images using something like the following command: sudo ...
0
votes
1answer
134 views

Launch emacs with ediff-files (of ediff-directories) from command line

I would like to launch emacs to ediff either files or directories. For example, I'd like something like: emacs -f ediff-files file1 file2 But when I do this, it doesn't take file1 and file2 as the ...
3
votes
2answers
82 views

View patch files with different region highlighted [closed]

Is there a desktop application, console utility, or preferably Emacs extension, which can highlight the different regions in a patch file? An example is the diff viewer of GitHub. The different part ...
32
votes
6answers
21k views

How can I diff two XML files?

On Linux, how could I generate a diff between two XML files? Ideally, I would like to be able configure it to some things strict, or loosen some things, like whitespace, or attribute order. I'll ...
28
votes
4answers
33k views

How do I do a binary diff on two identically sized files under Linux?

I have two identically sized files, and I need to do a binary diff to check whether they're the same. I'm currently runnnig diff file1.img file2.img but it's taking quite a while to process my ...
2
votes
2answers
526 views

How to compare two files for non-printing characters

To share a configuration file between two computers, I emailed the file to myself via my gmail account. When I loaded the conf on the second computer, the program had trouble reading every line. ...
0
votes
2answers
105 views

Can gnu diff recursively compare only filenames in different folder structures?

I know that I can recursively compare two dirs with diff -qr and output only the differences. However, this appears to compare file positions within the trees (for example, /a/b/file01 != ...
2
votes
5answers
3k views

Visual diff for multiple file pairs on Linux

I need a GUI program for Linux (Ubuntu Karmic) like tkdiff, which can display 2 files side-by-side, and highlight the differing lines, and it accepts multiple file pairs on the command line, but ...
0
votes
1answer
92 views

Recursive diff on directories says files differ, but no output when I diff on the files

(in the Linux Terminal) I used diff --recursive --brief dir1 dir2 and it tells me that File dir1/file and dir2/file differ But then, I try: diff dir1/file dir2/file and there is no output ...
7
votes
5answers
7k views

How can I compare two directories, one being a remote directory?

I want to compare two directories, one is local and the other is on another machine. How can I do that? Can I do it with diff?
1
vote
1answer
397 views

Tool to make a DIFF between HTML tables?

I am seeking a tool to make a DIFF between tables displayed in HTML tables - typically tables with identical layout, filled only with numbers, the numbers differing from on version to another. Raw ...
2
votes
1answer
209 views

linux diff: is there a way to list differences by when the files were last modified?

In the Linux terminal, I'm using diff --recursive --brief dir1 dir2 A couple of weeks ago, dir1 and dir2 were identical, but they have both been modified since then. I would like to order to ...
0
votes
2answers
1k views

Tool to create a patch that modifies/adds files within a directory structure

I have a set of files that need a set of changes applied to them. In this scenario I have a Java Application Server (distributed via a zip file) that I need to apply a set of known configurations to, ...
5
votes
4answers
8k views

Windows command line binary diff tools

Is there a Windows command-line diff tool that is free? I need to compare two binary files and see if they are different or not. I'm not interested in how they are different I just need to know if ...
0
votes
1answer
1k views

Compare content of directories in Linux

In Linux, if I have two directories, how I can see the differences of content in these directories? Now I use this command: diff <(ls -d dir1/*) <(ls -d dir2/*) Any other idea?
1
vote
2answers
329 views

Compare two files and output the differences

I am aware of diff and using loops but I just cant seem to really get what I need with diff. I'm basically looking to compare two files (file2.txt and file2.txt) and just get the output of what is ...
2
votes
1answer
207 views

Directory diff with text file output

It appears I was unable to save the scripts I used for converting some Subversion repos to Mercurial ones, more specifically the filemaps. How can I get diffs between two directories (added/removed ...
1
vote
1answer
87 views

How to apply binary diff produced by fc to a file?

How can one apply diff file produced by fc /b command on Windows to update some file in a simplest way possible; i.e. without buying anything or downloading some large/questionable software? The diff ...
0
votes
0answers
111 views

How to find similarities in two text files?

Given two text files, how can I find passages that are alike? I know that I can use Meld or another diff tool to show the differences, but how to do the reverse thing? For example, here are two texts ...
1
vote
1answer
29 views

How to mark files to manage the diff output

My collegues are maintaining a configuration file, which is deployed to production/test/staging environments by SaltStack. I am maintaining this file by using diff to see what has changed and code the ...
0
votes
1answer
193 views

How to capture diff output from find command exec?

I am using Ubuntu (Precise 12.04) I am trying to write some bash script to see if file is changed via awk replace by using diff command. I did a test with the following: #! /bin/bash diff fileA.htm ...
2
votes
0answers
73 views

Patching .iso files

sometimes I have only little bandwidth. Also I have access to a machine with high bandwidth via ssh over the low bandwidth line. So let's say, there's a new version of my favorite live system. The ...
0
votes
1answer
19 views

How to group “Only in” lines in diff at the beginning of the output

I did: diff -r directory1/ directory2/ Some files are different, and some files were only in one tree or the other, creating several Only in ... lines. How do I group these lines at the beginning ...