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

learn more… | top users | synonyms

3
votes
1answer
963 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 ...
-1
votes
0answers
10 views

How to snapshot and diff Windows registry and the the file system? [duplicate]

I'm solving the following problem - I'm installing software on Windows and it makes the system unstable for some reason. Windows starts crashing soon after. I want to know what changes it made to the ...
3
votes
0answers
34 views

How to provide user “hints” to “diff”? [closed]

Sometimes, when I am diffing two text files (usually in vimdiff), the diff algorithm gets confused and associates the wrong lines with one another. Once that's happened, the rest of the diff is often ...
0
votes
2answers
143 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
297 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
17 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 ...
3
votes
4answers
414 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 ...
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
38 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
8 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
49 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
9k 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
18 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
8k 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
255 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
66 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
62 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 ...
26
votes
6answers
18k 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 ...
16
votes
3answers
4k 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 ...
23
votes
4answers
29k 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
419 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. ...
4
votes
2answers
848 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 ...
0
votes
2answers
49 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
80 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
6k 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
352 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
163 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
889 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
155 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
201 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 ...
0
votes
0answers
27 views

An issue with git diff command

What could be causing this error on Mac OS X (mavericks)? I have git installed with homebrew ➜ whereis git /usr/bin/git ➜ which git /usr/local/bin/git ➜ git --version git version 2.0.4 Now when I ...
1
vote
1answer
75 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
68 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
26 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
127 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
45 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 ...
0
votes
4answers
1k views

What do these instructions mean in plain English?

I know it's for the linux program patch, but if I try to use it, I get the following error: missing header for unified diff at line 4 of patch malformed patch at line 5: quit Instead, I'd like to ...
2
votes
1answer
120 views

Diffing an entire hard drive, available tools?

There's an existing question similar to this that didn't get answered in the proper context (a massive volume of data to compare) at all, so I'm trying again here. I'm using SuperDuper to maintain a ...
0
votes
1answer
27 views

Recursively compare file identities in Windows environment using only standard Windows commandline tools

I want to ensure that deep directories of files are identical after copying. I've read this answer: http://superuser.com/a/414216/214579 However, neither fc or comp offer recursion. How would one ...
96
votes
6answers
146k 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 ...
7
votes
3answers
5k views

Binary diff/patch for large files on linux?

I've got two partition images (A and B) and want to use them to create a patch that I can apply on A on another computer in order to get the new B image without flooding the network. I have the ...
3
votes
2answers
774 views

How do I compare two folders recursively and generate a list of files and folders that are different?

tl;dr and an example I'm looking for a way to compare two folders recursively and output the relative paths all files (and folders) that are different (by size or by timestamp, à la rsync). For ...
9
votes
3answers
1k views

How to ignore whitespace in Kaleidoscope (diff tool)?

In Kaleidoscope, how do I configure it to ignore whitespaces?
2
votes
2answers
2k views

Diff to actually totally ignore whitespace

I am looking for an application that will diff two files, and actually ignore all whitespace, so for example: class foo { bar spaz } is equally equivilant to class foo{bar spaz} or, as ...