diff - Command-line tool to display the differences between two files, or each corresponding file in two directories.

learn more… | top users | synonyms

2
votes
2answers
165 views

Getting diff (or git diff) to show inserted hunks properly

Let's say I have two files. The first one has the contents: line 1 foo line 2 line 1 bar line 2 And the second one has a new section inserted in the middle, so it looks like this: line 1 foo ...
1
vote
2answers
96 views

Reduce redundant logfile

I often have longer redundant log files, redundant in the sense that blocks of text repeat with minor changes. The length of the files makes it difficult to spot the actual information. I had the idea ...
2
votes
1answer
271 views

How can I see moved lines in a file comparison with vimdiff / diff?

Moved lines are frequently annotated as deletes and adds but they can be shown as moved-from and moved-to instead. Like in this screenshot of Notepad++.
1
vote
1answer
30 views

Different results OS X/Linux with “find PATH -mount \( -type f -o -type d \) -print0 | LC_ALL=C sort --zero-terminated > OUTPUT.txt”

this command is part of a script I use for comparing files: find test/ -mount \( -type f -o -type d \) -print0 \ | LC_ALL=C sort --zero-terminated > OUTPUT.txt // test/ is the PATH ...
0
votes
1answer
41 views

Diff: slightly different filenames, same file

I'm using diff -rq to compare directories on a Mac OS X 10.6 server. In folder1, we have 'filename'. In folder2, we have'filename.archive' because folder2 is created by a file sync app that also ...
2
votes
0answers
66 views

One way diff between 2 directories

I am looking to perform a diff between 2 directories, both of which contain may files and subdirectories. I am hoping to perform a one-way diff between a source and target directory that will return ...
2
votes
0answers
376 views

diff -r only for certain file types

Is there a way I can perform a recursive diff of two directories but only compare (in their respective places) files that match a specific filename or filetype predicate? E.g. I would like to do ...
2
votes
0answers
169 views

Using Unison with colordiff

I want Unison to show the diffs with colordiff. I’ve got diff = colordiff -u CURRENT2 CURRENT1 | less -R in my config file but it seems like Unison pipes the output to plain less nonetheless, so I ...
1
vote
0answers
31 views

How can i compare 2 files and add lines that aren't on the first one?

I have run into a problem while doing some coding, and I need to compare two files, here is an example input file inputfile1.txt: car php module so js node array and another input file: ...
1
vote
0answers
52 views

Merge several files with maximum 1 line difference

Suppose I have the following files: file0.c: int b=NULL; int a=NULL; file1.c: int b; int a=NULL; file2.c: int b; int a=NULL; I am looking to merge the files file1 and file2 to generate the ...
0
votes
0answers
18 views

Configuration files difference between 2 dirs of the same app

I have an application installed on 2 machines I upgraded the first application on one server and want to copy the installation from this server to the other one but there is changes in some conf ...
0
votes
0answers
65 views

How to compare two rfs directories with `diff`?

I've two RFS (RFS = Root File System) directories, which I would like to compare to each other with diff. Both directories represent an RFS of some other system, and they may contain links. If those ...