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

learn more… | top users | synonyms

1
vote
1answer
690 views

Diff command. Basic explanation

Just started with diff command. Can you please explain me, diff thin_provisionings_controller.rb thin_provisionings_controller.rb[211] 512,513d511 include ThinProvisioningsGraphModule So ...
1
vote
2answers
879 views

Comparing two directories in different servers

We copy our production code and data files to a testing server on a weekly basis. It can take hours, and sometimes it hasn't finished. What is the best method to confirm that the directories have ...
1
vote
1answer
30 views

Assign diff -y column names

I have two files and a shell script. File 1: Batman Superman John Snow Jack Sparrow Rob Stark File 2: Batman Ironman Superman Spiderman John Snow Arya Stark Jack Sparrow Rob Stark The hound ...
1
vote
2answers
1k views

diff binary files of different sizes?

Is there a neat way to see the difference between two binary files? They are mostly the same, but some bytes are changed, and one of the files has sequences inserted in some places. Diffing the ...
1
vote
1answer
722 views

What is the difference between Context output format and Unicode output format while taking diff?

What is the difference between Context output format and Unicode output format when taking a diff? diff -NBur dir1/ dir2/ diff -NBcr dir1/ dir2/
1
vote
2answers
89 views

how to count number of differences in large streams quickly?

I want to count the number of differences (different bytes) in two large streams (devices/files). E.g. two hard disks, or one hard disk and /dev/zero. The program(s) involved must be fast, as fast ...
1
vote
1answer
137 views

Create a recursive diff directory. Copy reference and diff. Recreate original directory

I have several directories/web site resources, each has total size of several gigabytes. They are more than 90% the same. Sometimes only a few files are modified. I need to download these files for ...
1
vote
1answer
69 views

Interactive backup tool

I am looking for a backup (or diff) tool where I can select interactively which file I want to copy towards my external hard-disk. Let me explain with further details: I have two computers and an ...
1
vote
1answer
431 views

Reading two files into an IFS while loop — Is there a way to get a zero diff result in this case?

I have a text file full of several hundred lines of sequences like this: b 29. b 52. c 84. c 83. c 94. c 93. c 61. b 38. c 81. c 92. c 28. c 37. ...
1
vote
1answer
782 views

Diff similar lines

I'd like to print a list of lines where the first word in two files is identical, and the rest of the words are not. Some complicated mess with comm, grep and cut would be possible, but hopefully ...
1
vote
1answer
66 views

Running 'diff 'command after the 'find' command

I'm running this code on shell mv -f ~/sites/text1.txt ~/sites/text2.txt;find ~/sites/ -type f -exec sha1sum {} >> ~/sites/text.txt \;diff ~/sites/text1.txt ~/sites/text2.txt; However every ...
1
vote
1answer
174 views

RANCID like configuration differ for linux applications

I'm looking for a RANCID-like (http://www.shrubbery.net/rancid/) config management tool - the catch is that I want to manage config files for Linux applications like mysql, apache, memcache, varnish, ...
1
vote
1answer
65 views

Program to upgrade configuration files

When upgrading Ubuntu (and probably other *nixes), the upgrade process will show a diff of changed configuration files and ask whether I'd like to replace them, keep the old version, or manually merge ...
1
vote
1answer
363 views

RPMs and patching

I have 3 files (from here)that I have been given to install in an attempt to upgrade the compiler: binutils-2.13.2.1-1.mipsel.rpm binutils-2.13.2.1-1.src.rpm binutils-2.13.2.1-r5900-7.diff.gz ...
1
vote
0answers
53 views

How do I fix a patch [closed]

I am trying to fix a patch, and reviewed a couple of very interesting urls. One of which is this one: Handling Patch Rejects I like to make sure I am understanding the patch and the problem correctly. ...
1
vote
0answers
50 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 ...
1
vote
2answers
95 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 ...
0
votes
3answers
52 views

how to compare total file

Suppose i have 2 config files such as: file 1: smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes virtual_gid_maps = static:5000 File 2: ...
0
votes
1answer
521 views

Directory diff in bash script

I have a bash script that expands two archives (jar files) into two directories and then does a diff of the two folders. I want the diff to be piped into a file so I do this in the bash file. diff -r ...
0
votes
1answer
26 views

Read files in Directory and take diff

I have two directories named comp1 and comp2 and both have files named file1 and file2. I need a bash script which read file1 from both the directories and take diff of each file and redirect to some ...
0
votes
2answers
47 views

SSH using diff and still not working

I have 2 file, a.txt and b.txt and I want to compare them. a.txt contains: abc jkl < jkl mno > mno pqr <> pqr b.txt contains: abc jkl < jkl mno > mno pqr <> pqrs stu I'm ...
0
votes
1answer
101 views

Is there an application to find similar documents?

Is there any good software that finds groups of multiple files that are similar, or where one file includes a part of another? I have a directory with lots of files mixed up. Among the files, are ...
0
votes
1answer
38 views

rcs and graphical diff

I have a machine running Ubuntu 6.06. Source files under rcs (no git available). I need to visually compoare older revs of files with the checked out version. Until now I have moved the file and ...
0
votes
0answers
59 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 ...
-1
votes
1answer
3k views

Bash function to compare two binary files [closed]

I need a function to compare 2 binary files, here the requirements: 2 files, not 3 or 4 files can't be assumed to exist avoid running checksum (CRC/MD5/SHA/...) until one must if running multiple ...