0
votes
0answers
31 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
12 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
1answer
50 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
222 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 ...
0
votes
2answers
465 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 ...
3
votes
1answer
3k 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
45 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 ...
0
votes
0answers
34 views

Using diff to compare files in different folders ->Ubuntu 13.04 [duplicate]

I have been using diff and know how to compare the contents of two directories (and sub directories) and to compare files. There was a command that compared all files in all subdirectories of a ...
0
votes
1answer
34 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
2answers
238 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
58 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 ...
1
vote
1answer
99 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 ...
1
vote
0answers
414 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* ...
1
vote
2answers
1k 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 ...
0
votes
1answer
126 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 ...
1
vote
2answers
129 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 ...
1
vote
1answer
2k 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?
2
votes
2answers
552 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
73 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 ...
2
votes
1answer
401 views

How to diff part of a file

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 ...
3
votes
3answers
698 views

Using diff on a long one line file

I have a file that has only one line. Its size is about 20,000 bytes. The file has been modified, and I wanted to know where. I thought using diff, but it shows me the complete line, because it ...
1
vote
2answers
658 views

Using 'diff' command over ssh

If I have a folder with several files on my computer, and a copy of the same folder on a remote server, is it possible to run 'diff' through ssh so I can see the differences between my copy and the ...
1
vote
4answers
1k views

Difference between folders

How can I compare recursively 2 folders with same structure. With using diff or git diff from bash command line?
1
vote
2answers
778 views

Comparing files for similarities

Is there a standard Linux tool that looks for similarities between two files? The diff tool works best comparing files that are mostly the same, and outputs where they differ. I'm looking for a tool ...
3
votes
1answer
404 views

How to create Delta / Changed files from directories?

I'm trying to create a "changed files" package from one directory to another and need to find a Linux/Unix tool/utility that will be able to handle this. Example: Package_1.1/ (old) Package_1.2/ ...
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?
2
votes
2answers
187 views

Comparing 2 (or 3 Files If Possible) “Line By Line”

I want to find out the differences of 2 (or 3 files if possible) line by line. Diff utils can do this, however it gives inaccurate results. Because, 2 files have exact number of lines which is "134". ...
0
votes
2answers
81 views

Running the output of script, and checking for consistency

Given a file that was output by script, is there a way to run all of those commands in order, and then check to see if the output matches what was in the script file? I assume that diff can be used ...
1
vote
1answer
205 views

GNU/Linux substitute for the Windows-based TreeComp tool

I miss the TreeComp tool from Windows on Linux. Does anybody know about a similar tool for Linux? I've tried Unison & Unison-gtk (slow and cumbersome), diff (various), meld, mc, rsync (immensely ...
1
vote
2answers
2k views

Is there a tool to measure file difference percentage?

I am looking to compare two text files. Normally, I can just use diff to compare the two files to see the differences. This is great, except that I am more concerned with the percentage difference of ...
1
vote
3answers
837 views

Confirm that two filesystems are identical, ignoring special files

/media/A and /media/B should be identical, but I want to confirm before deleting one. Duplicate file finders don't work, because they'll find two copies of the same file within B, for instance. I ...
7
votes
3answers
4k 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 ...
1
vote
2answers
189 views

diff unified output; supress @@ lines?

When using diff, is there a way to suppress the first two lines (listing the file names and times) and all the lines beginning with @@ in the output? All I want are the lines that show what to delete ...
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 ...
12
votes
3answers
7k views

How to diff large files on Linux

I'm getting a diff: memory exhausted error when trying to diff two 27 GB files that are largely similar on a Linux box with CentOS 5 and 4 GB of RAM. This is a known problem, it seems. I would expect ...
17
votes
4answers
23k 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 ...
12
votes
1answer
6k views

Listing lines from just one file in DIFF

I would like to get (GNU)DIFF to printout only lines that are different in one file. So given ==> diffa.txt <== line1 line2 - in a only line3 line4 changed line5 ...
67
votes
7answers
103k 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 ...
8
votes
2answers
3k views

interactive/visual merge tool for console?

I'm a big fan of meld - a visual diff and merge tool for Gnome. It shows two files (or directories) side by side with their differences highlighted and I can easily select which parts I want to move ...
2
votes
4answers
445 views

Why are there binary differences among compressed files generated exactly the same way from the exact same starting file?

I use the "diff" command to compare two compressed files generated using zip on the exact same starting file and they are reported as being different. However, when I uncompress them and use the ...
17
votes
6answers
13k 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
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 ...
10
votes
4answers
10k views

How to diff directories for different files, but not line-by-line

I want to see, recursively, files that are different in two directories. Diff can do this, but it shows me the line-by-line differences, which I don't want. Is there a tool that does this, or a way to ...
2
votes
5answers
7k views

Difftool for Ubuntu like OS X's Opendiff

What is the best difftool for Git repos like OS X's Opendiff?