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

learn more… | top users | synonyms

1
vote
1answer
188 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
33 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
45 views

View patch files with different region highlighted

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 ...
22
votes
6answers
16k 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 ...
0
votes
0answers
12 views

How to watch text file changes over time?

I am looking for a tool that allows me to watch text file changes in the spirit of tail -f or the less [F] feature but not only for data appended to the file but for overall changes. My dream tool ...
15
votes
3answers
3k 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 ...
21
votes
4answers
27k 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
372 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
769 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
23 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
2k 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
75 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?
0
votes
0answers
51 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 ...
1
vote
1answer
330 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
144 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
789 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
65 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
191 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 ...
2
votes
5answers
8k views

Difftool for Ubuntu like OS X's Opendiff

What is the best difftool for Git repos like OS X's Opendiff?
0
votes
0answers
22 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 ...
0
votes
0answers
21 views

Is there a tool that can compare multi level directories and create a report?

I'm currently working on web server migration to new servers. As part of this, I also have to update file paths and make changes to config files. End of the day, I have to submit a report of what was ...
1
vote
1answer
65 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
55 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
22 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
84 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
37 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
17 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
75 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
22 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 ...
0
votes
0answers
22 views

Is there a diff-like tool that searches the directory for existence of the file or folder?

In an attempt to de-duplicate the data on my system, I've used tools such as Gemini for finding duplicate files across directories and diff tools like Kaleidescope for understanding how the ...
85
votes
6answers
131k 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
421 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 ...
8
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
1k 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 ...
1
vote
0answers
46 views

OSX Terminal: FTP upload only if file size different

I am currently using FileZilla to backup my Documents. The manual procedure for this is as follows: Sign in to FTP using username and password Open Documents folder on FTP site Drag documents from ...
0
votes
1answer
17 views

Diff content of a website recursively

I have a lot of tools I'm using and want to be able to monitor their changes through their documentation. An example would be Vagrant Documentation - https://docs.vagrantup.com/v2/. I want a solution ...
1
vote
2answers
99 views

compare two directory trees

I have two music libraries, one a newer version than the other. I would like to compare them to figure which files I need to copy from new music tree to old. I have tried diff --brief -r ...
0
votes
2answers
40 views

Merge two text files, with differences highlighted

I have two text files, which are almost the same except for some changes on a few lines. I would like to merge these two files into a single text file, with differences highlighted, so that I can then ...
2
votes
3answers
247 views

Compare file system properties/attributes of two files

There are many methods that can be used to compare the data of two files. That is not what I'm interested in here. How can I easily compare or "perform a diff" of what could be called (perhaps you ...
0
votes
0answers
318 views

Kdiff3 show conflict even that files have equal text and are binary equals

Like in title. Kdiff3 info dialogue shows that ( i do 2 way merge): Total number of conflicts: 0 Nr of automatically solved conflicts: 0 Nr of unsolved conflicts: 0 kdiff3 files a and b have equal ...
1
vote
1answer
536 views

Show git diff HEAD~1 of file not touched in recent commits

In Git, to see the differences with a previous commit I run this: git diff HEAD~1 To see the commits related with a single file I would run this: git log --oneline file But if I run the ...
0
votes
1answer
43 views

Dynamic diff of one file

I am trying to diff one file over time using process substitution in bash. diff <(cat /path/to/file | sort; sleep 20) <(cat /path/to/file) I also tried: diff <(cat /path/to/file | sort ...
0
votes
0answers
19 views

Colorize only the changes and not the complete line in diff

I have to very similar files which usually only differ in the capitalization. Currently I'm using the default diff but seeing the actual difference can be hard. For example I compare files only ...
0
votes
0answers
19 views

Software for creating DB alter script that ONLY uses DDL scripts

I am looking for a software which can compare two databases by ONLY using DDL script (i.e. I dont want to create a schema but rather do it on the fly). Is this possible ? Any ideas ?
1
vote
2answers
39 views

Find two newest change files and compare them

I have a script that wgets a .txt file and datifies the names. I'd like to diff the changes between the newest & next-to-newest file. This is how I am able to select them: ls -t -l | awk ...