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
votes
0answers
17 views

Which diff tool can support brace/brackets matching for JavaScript [on hold]

Which diff tool can support brace matching for JavaScript? Tool like Beyond Compare can support syntax highlight but does not support parentheses or brackets matching.
1
vote
1answer
12 views

How to get Side-by-side layout in Beyond Compare 4's Picture Compare

Beyond Compare 4's Picture Compare has 2 images on top and the composite image below. This suits landscape images, but wastes plenty of space for highly portrait images on 16:9 monitors: This video ...
0
votes
1answer
32 views

exclude socket files during diff -r

diff has an option --recursive (-r) to do a comparison between two directories (the files inside them). Is there a way to make diff ignore all socket files and only socket files? I am using diff --...
0
votes
1answer
13 views

What are these odd characters appearing when I use P4Merge with TortoiseSVN?

When comparing files, I get these characters at the start of the diff. Image of the strange characters I'm not sure exactly what more information to provide, but will be watching this question if ...
1
vote
1answer
23 views

Is it possible to have meld open all files at once when used with “git difftool”?

Meld is capable of loading many files at once (in tabs). However when used with git difftool, Git will ask if you want to view each file (which can be slow and annoying to have to keep opening and ...
0
votes
0answers
15 views

Binary Patch Directory Recursively in Windows?

What is the easiest way to accomplish this in Windows? I have files that are over 1 gigabyte and also many smaller files. They are mostly not text files. Old_Folder (dozens of files) New_Folder (...
1
vote
2answers
83 views

compare and find differences of 2 huge text files (50 gb)

I want to find the differences between two text files (more than 50 GB) each. I tried diff but, I got memory exhausted problem. I am using Windows7. My code is in PHP. I was calling diff from my ...
-1
votes
1answer
47 views

How can you pass output of find command to a diff command with multiple files?

I find 5 files ending with .csv. Now I want to compare the content of these files using diff command. How can I perform both actions in one command on a Linux terminal on bash? I want to do something ...
0
votes
1answer
26 views

Using 'diff' compare usernames from file1 to file2 containing emails

I am trying to identify active accounts over dead accounts and was wondering if diff along with grep or sed or regex can be used, instead of writing a long program. File1 (usernames) ...
0
votes
1answer
33 views

How to get the difference between 2 cells

I have an Excel file like below. The value in column C should be the difference between A and B (A is always longer, B is always A substring). If both values in A and B are same, C will be empty. ...
3
votes
2answers
130 views

diff stop after first difference

I'd like to perform a diff on 2 files and have it cease at the first difference. I don't require that the command be done via diff, of course, but I do require that the actual command cease once the ...
0
votes
2answers
33 views

How can I diff two files and get what is different in the second one as an output

What's easiest way to diff two files, check what is different in the second one and get it as output? I'm comparing two css files, and rest is the same only colors are different. PS: I also want to ...
1
vote
1answer
99 views

How to send a delta (differential part) of a large binary file over the Internet?

I have sent a large (>1GB) binary file to a friend over a slow metered data plan and now I need to send the second version of the same file only slightly changed. I want to send only the delta/diff-ed ...
0
votes
0answers
11 views

Make git merge act on paragraphs/blocks instead of lines?

I am using git to manage a "configuration file" consisting of a number of blank-line-delimited configuration blocks of the standard sort like [one] alpha=1 beta=2 Most changes to this file consist ...
0
votes
1answer
58 views

git diff --no-index but with multiple files

I really like git diff's output format, and I use it a lot as git diff --no-index to compare arbitrary non-git-related files. But as far as I can tell when using --no-index you can provide only a ...
0
votes
0answers
13 views

KDiff3-style *directory merge* tool for the Linux terminal?

I need a nongraphical tool (e.g. ncurses-based), that allows me to merge large directory structures. Ideally, something as nice as Beyond Compare. Or at least KDiff3. I know there was such a tool, ...
1
vote
0answers
15 views

Debian update: how to get more readable diff output?

I like working with apt-get on servers, but it's very cumbersome to go through the diffs of config files when upgrading a system to a new Debian version. Ideally it should be easy to hide changes in ...
0
votes
1answer
52 views

svn diff suddenly not showing anything, even though svn status shows modified files

I made some changes to a local, up-to-date repo, on CentOS 7, svn 1.7.14. Running svn diff shows the changes. Not sure if this has much to do with it, but a while later, I did an svn copy over to a ...
0
votes
1answer
69 views

How would I diff two mbox files in an intelligent way?

I have two mbox files containing about 6k emails each. They should be more or less identical, though #1 contains about 100 emails which #2 does not contain. I would love to generate a third mbox file ...
1
vote
1answer
72 views

Git: show inline diff within context of full file

How can I view the full contents of a file, at a given revision, with 'inline' diffs; i.e. new lines prefixed with plus, lines that were removed prefixed with a minus, etc?
0
votes
2answers
70 views

How do I recursively diff two directores and ignore the first n lines of each file

This question is similar to How to diff only the first line of two files?, but recursively. I would like to diff two directories but: diff only the first N lines of each file in the two directories ...
1
vote
1answer
25 views

Looking for different tags in two XML files when the content is different

From time to time I translate some Android apps: the developer sends me an XML file, e.g. <string name="foo">Foo</string> <string name="baz">Baz</string> and I send him back ...
0
votes
1answer
72 views

BC3 - Folder Compare shows files as 'Binary different', though differences are unimportant?

I am trying to compare a folder with a zip file to see if there are any meaningful differences between the source files they contain. I have set my compare to ignore the folder structure for ...
0
votes
1answer
15 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
38 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 'NR=...
3
votes
1answer
115 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 ...
1
vote
2answers
113 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 ...
6
votes
5answers
2k 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 ...
1
vote
0answers
53 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.
1
vote
0answers
21 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 ...
0
votes
1answer
324 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 ...
0
votes
2answers
224 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 != /b/c/file01)....
0
votes
2answers
990 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
2answers
1k 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 ...
1
vote
1answer
133 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
1answer
273 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
38 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 ...
2
votes
0answers
148 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
290 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 ...
1
vote
1answer
685 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 ...
3
votes
1answer
420 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
86 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 ...
3
votes
2answers
4k 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 ...
1
vote
0answers
117 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 ...
1
vote
2answers
1k 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
57 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 ...
0
votes
1answer
24 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 ...
1
vote
1answer
1k 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 ...
0
votes
1answer
88 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 &...