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

learn more… | top users | synonyms

7
votes
1answer
7k views

How can I diff binary files in git?

I assume I need to set up a difftool. What difftools work? How do you put the parameters in?
0
votes
1answer
57 views

How am I supposed to use diff in this situation?

I recently asked a Google Groups forum for help with setting up a Vagrant/Chef/Django VM thingamajigger, and I received the following help: The fabfile.py had some errors for me. After I fixed ...
0
votes
1answer
145 views

How to make redirected input count as command output

I have a simple C console program that takes some keyboard input and outputs prompts and calculations. I also have two text files: a file with input for the program, and a file that contains the ...
0
votes
2answers
52 views

What is the right tool to diff filecontents of a directory in OSX?

I know that I can use Git for some cases, but I still believe that there exists a simpler solution by default. Does there exists any tools by default in the newest OSX for the diff of filecontents in ...
1
vote
2answers
5k views

How to compare content of two files?

I got a mission to compare the content of hundreds of pair files. I have to quickly compare each pair and to provide an answer if that pair is equal (in content) or not. The files could be text or ...
2
votes
2answers
4k 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 ...
14
votes
1answer
15k views

How can I make 'diff -X' ignore specific paths and not file names?

Doing: diff -r -X <ignore-list> <src-dir> <dest-dir> doesn't seem to make diff ignore entries in <ignore-list> if they are of the form <dir>/<file>. Entries of ...
0
votes
1answer
108 views

DIff ignore arguments from a file doesn't seem to be working

When I run the following command, it doesn't seem to be ignoring what I specify in the ignore.txt file. I have tried adding some of the arguments with -x, but there are way too many to do that by ...
3
votes
2answers
135 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
2answers
413 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 ...
3
votes
1answer
1k views

Recursive diff and symlinks

I'm trying to diff two directories using (well) diff. However, diff actually follows symlinks and compares differences between the targeted files. I can't seem to find a way to not have diff do this. ...
0
votes
1answer
41 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
1answer
74 views

recursive diff with per-file preprocessing

How do I get a combined effect of diff -r left_dir right_dir and diff <(cat left_file | myfilter) <(cat right_file | myfilter) without much scripting?
2
votes
3answers
477 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 ...
3
votes
2answers
3k views

Diff -b and -w difference

From the diff manpage: -b, --ignore-space-change ignore changes in the amount of white space -w, --ignore-all-space ignore all white space From this, I infer that the difference ...
0
votes
1answer
674 views

Modern looking interface for diff/meld type program (Mac OSX)

I'm using Mac OSX, and I was wondering if there was a good program for comparing two text files for differences? I have meld and the interface looks pretty old. It's just a small cosmetic thing, but ...
0
votes
1answer
118 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 ...
2
votes
1answer
298 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
0answers
46 views

Improve diff viewer in Visual Studio 2010

In Visual Studio 2010 you can compare a local file with the latest version/workspace version. This opens up a diff viewer showing the two versions of the file side by side with the lines that are ...
0
votes
1answer
966 views

git difftool doesn't launch Beyond Compare from Powershell or command prompt

I'm trying to use Beyond Compare 3 as my diff tool with git. I configured git with the following commands: (source: Using Beyond Compare With Version Control Systems) git config --global diff.tool ...
1
vote
0answers
936 views

How to only add lines using patch?

I'd like to be able to use diff & patch in order to write new lines to a file. To clarify what I mean a bit: Original file: test1.repo exclude=mongo* exclude=sqlite* ...
23
votes
4answers
8k 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 ...
10
votes
4answers
10k 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 ...
1
vote
0answers
384 views

Vimdiff functionality in Sublime Text 2

I wanted to know if it is possible to have a vimdiff like functionality to check for diff and have synchronized scrolling of two (or more) files in Sublime Text 2 just like vimdiff? Thanks
0
votes
1answer
217 views

Given 2 sorted files - delete all words found in another

On Linux I have two text files with russian UTF8 words sorted with sort -u (actually I used :%sort u in Vim, it produces same results). One of the files dict.txt contains around 700000 words of my ...
0
votes
1answer
54 views

How to see what's changed on git

A bunch of new commits have been made on the remote git repository, and you want to see what's changed from the version you have checked out on your computer previously. How do you do so?
4
votes
1answer
608 views

Diff between two directories and keep only the unchanged ones

I need to diff two directories: A: /path1/ B: /path2/ The directory A contains all files and subdirectories that are also contained in B. The files in A (and in its subdirectories) can have ...
1
vote
1answer
465 views

Subtract files from one another recursively between two similar directories

I'm trying to concoct a way to grab two (nearly identical) directories and show me the difference between all files in the two directories. Looking for two different things: 1- List all files ...
2
votes
2answers
688 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. ...
1
vote
1answer
1k views

Key to close a fold in vimdiff?

Pressing spacebar on a + fold in vim in diff mode causes the fold to open. What and where do I key if I want to close the fold again?
1
vote
1answer
363 views

Complete file system diff

I have a program which I need to install on top of Windows 8. Trouble is, the program makes changes to a few files which make another program not work, chances are that registry settings are involved, ...
1
vote
2answers
636 views

formatting of the diff output

I have 2 files that I want to differ. File B is produced appending some new line to file A. I want to highlight the appended data by using diff. I would like to avoid printing out the '>' characters ...
3
votes
1answer
342 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 ...
0
votes
1answer
239 views

How can I automatically compare and merge a large number of text files?

Due to a series of technical snafus with Dropbox and Simplenote syncing, my main writing folder, which contains text files mostly in Markdown format, is all messed up. I have about 500 unique files, ...
8
votes
1answer
9k views

diff directories, excluding one folder inside

I think I have two directories with the same content, but I want to check it. Also, I want to exclude a folder that is inside both directories. How can I do it?
0
votes
1answer
29 views

How do I get a good directory difffile I can use to patch/what to use for patch

I'd like to make a clean diff of a directory that allows me to later use a gui patch program for windows to apply the diffile. If possible I don't want to have to deal with hardcoded paths in the ...
0
votes
1answer
54 views

diff 2 files by (class) method or function?

This just occurred to me today. I've primarily been diffing files whole text using tools like BeyondCompare, etc. Was wondering if there's a tool or functionality to do selective diffs of 2 files, ...
1
vote
4answers
121 views

Is there a program that will show a tree of the differences in two file trees?

In windows I manually back up from time to time by formatting my external drive and copying the contents of my data partition over. Inevitably there is a difference in the number and size of the files ...
2
votes
2answers
2k 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 ...
2
votes
2answers
2k views

Tool for performing a PDF Diff? [duplicate]

Possible Duplicate: How to compare the differences between two PDF files? Are there any tools available for performing a diff between two PDF files? Or am I better off just extracting the ...
2
votes
2answers
2k views

Tool for diffing large files

When I use "diff" to find the difference between two large data files, diff A.txt B.txt > dif.info it is output: diff:memory exhausted or add the argument "-H" diff -H A.txt B.txt > ...
2
votes
2answers
83 views

Create zipfile from changed files in 2 directories

What I'm trying to do is create a zipfile (or some different archive) which contains all the changed files from 2 provided directories. The path of the files should be persisted in the archive, so the ...
1
vote
2answers
806 views

diff and patch tool

I'm trying to generate patches for a bunch of files I changed. I'm using Meld which does a great job of diff’ing the files in a nice visual manor, then it allows me to save and generate a patch file ...
3
votes
2answers
4k views

Diff two files side by side, new lines on left column for no match

This has been getting the good half of my day and I am sure such a solution must exist (if not, then I am programming one), but alas, here is the question. I have two files, hpc.sorted.modules.txt ...
7
votes
1answer
3k 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
111 views

diff for multiple files

I use "diff -y" command to compare 2 results of different versions of my program line by line. Like this: 1 1 123 | 234 asdf | qerq Is there analog for multiple files, which will allow to ...
1
vote
1answer
4k views

why doesn't my .gitconfig work? (for external diff)

I added this in ~/.gitconfig: [diff] external = mvimdiff [difftool] prompt = false and made a 755 /bin/mvimdiff that: #!/bin/sh mvim -d "$2" "$5" in order to invoke MacVim as my git ...
0
votes
1answer
61 views

How can I get a diff-like comparison of two files without the “change” sections?

I have two files that I would like to compare in terms of additions and deletions only. For example, if I diff these two files: start old old old end and: start old old but now new new new end I ...
1
vote
0answers
84 views

Does Sibling Node Order Matter In Canonical XML? [closed]

When using $ xmllint --c14n one.xml > 1.xml $ xmllint --c14n two.xml > 2.xml $ diff 1.xml 2.xml Would it matter if the order of the sibling nodes were different? I.e. are these the same? ...
2
votes
1answer
1k 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 ...