Questions tagged [diff]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Cross-compare several files with a diff tool

Have anyone encountered the challenge of comparing several files with each other on a Mac/unix machine? Consider a list of files 100.txt, 101.txt, 102.txt etc. in the same folder. How can I cross-...
user avatar
1 vote
3 answers
217 views

BeyondCompare doesn't ignore difference in line endings (DOS/UNIX)

I am using BeyondCompare 4 on Windows 10 to compare two directories with thousands of files. They are the basically same, but one exported from Windows, and another one from Linux. The only difference ...
user avatar
0 votes
0 answers
27 views

How do I create a side-by-side file diff importable as a *table* by Excel, Word, or Google Docs?

diff -y file1 file2 creates output like this: I want to take this output and convert it to a CSV format where the text at left is in one column, the < or | or >, if any, is in the second ...
user avatar
  • 101
0 votes
1 answer
36 views

What is Dropbox Sync Technology name [closed]

I remember Dropbox had (and still has, I think) a method for using less data when syncing files. It compares the byte difference between the original file and the new version, and only uploads/...
user avatar
  • 135
0 votes
1 answer
68 views

Is there a way to annotate that a PR depends on another PR

If I create a Pull Request from a branch git checkout -b branch-for-first-PR # edits and commits git push origin branch-for-first-PR do some work in it, and then want to experiment with building on ...
user avatar
0 votes
3 answers
59 views

How can I compare the source & destination paths with a different directory structure across different operating systems?

The source & destination paths have >100k different directories. I would like to compare the files between the source & destination without accounting for the differences between the ...
user avatar
  • 209
0 votes
1 answer
47 views

change windows partition device number as reported by cygwin stat

I have two partitions with the same device number: $ stat -c "%D" /cygdrive/c ec6d967e $ stat -c "%D" /cygdrive/g ec6d967e I believe this is because G: was restored from an image ...
user avatar
  • 11
1 vote
0 answers
22 views

diff while ignore unicode whitespace characters (CJK full width space)

I'm trying to diff two files. One of these files contains extra full-width spaces (U+3000): Text 1 Text 2 Text 3 Text 1   Text 2 Text 3 diff -w A.txt B.txt reports 2c2 < Text 2 --- >   Text ...
user avatar
  • 111
3 votes
1 answer
986 views

Is there a way to access files from one WSL 2 distro/image in another one?

I have several Unbuntu WSL 2 "installations" on my Windows 10 system and I'd like to be able to run tools like rsync and diff between them. Is it possible to mount/find where the files for ...
user avatar
0 votes
1 answer
89 views

Is there a way to make Unix diff -r compare only differences in filenames, but not check if any single file actually differs?

I need to compare two large directories with a lot of files in them. I tried using: diff -r Directory1 Directory2 but unfortunately the process is really slow due to the amount of files and their ...
user avatar
0 votes
1 answer
386 views

How can i compare two frames of a Wireshark capture?

I made a capture of the USB traffic with USBPcap and Wireshark to debug a HID touchscreen. Now i have identified the interesting URB_INTERRUPT packets, but how do i compare the HID Data of those? I ...
user avatar
  • 81
0 votes
0 answers
15 views

Diff since Nth byte for large file backup

I've a hundreds of very large files (500GB+) that I've to sync daily to an external server. These files are peculiar because they only change/append after the 99% of the file. Hence I was wondering if ...
user avatar
  • 101
0 votes
1 answer
84 views

What is double plus mark in gitk?

git diff HEAD HEAD^2 shows a single +, but gitk shows 2, as in the following figure. I wonder why. + int k = 0; + for(; j < i; ++i){ + for (k = 0; k < 1000; ++k){ ++ if(groupids[k] =...
user avatar
  • 2,486
0 votes
0 answers
23 views

Find different file in directory

I try find one file that is different on folder. I have 4 files i.e. file1, file2, file3 and file4. File from 1 to 3 have text "not uniq", file 4 is empty. How can i find this different file?...
user avatar
  • 113
1 vote
1 answer
184 views

Emacs ediff does not show inline word based differences

I am using emacs with ediff to compare two files. and my ediff view does not show inline differences. e.g., if lines from both files only have one word difference, ediff cannot highlight the word but ...
user avatar
  • 585
2 votes
2 answers
2k views

Best way to compare two very large directories in Linux

I need to compare two directories on Linux filesystems on two separate servers in order to identify whether all the files from SERVER1 are present on SERVER2. The total data set is about 4TB of files ...
user avatar
0 votes
0 answers
165 views

make a difference between pcap files

I have two pcap files and I want to make the difference between them. And store the difference in another pcap file. I tried diff command but it's not suitable with the binary files and I used also ...
user avatar
  • 11
0 votes
1 answer
148 views

Comparing non-git project with a git repo

I have a project that was always manually deployed to a server without Git (as the server was behind a firewall that could not access Bitbucket), even though the project is managed on Bitbucket on my ...
user avatar
1 vote
0 answers
167 views

How to include added and removed files to a unified diff of a CL in perforce

I want to create a unified diff or patch using p4 describe -du or p4 diff2 -u, to apply later with patch utility. But the problem I encounter that these commands skip the content of added/removed ...
user avatar
0 votes
1 answer
47 views

Get the changes before and after a script run in linux (based on date and or size)

Given a directory with a tree of directories and files inside of it, presumably containing log files. How to know which files got changed after running a specific application. Taking into ...
user avatar
  • 211
0 votes
0 answers
213 views

MATLAB - Error using interp1>reshapeAndSortXandV X and V must be of the same length

I geht this error message when I try to derive my acceleration of the car. I think there is a size problem, but I don't know how to solve it. The data is measured from a car. meas.jerk.data = diff(...
user avatar
  • 103
2 votes
2 answers
298 views

Diff tool for finding a minimal set of changes

I have two versions of a text file, with many changes (including whitespace, linebreak differences, etc.). All of the diff tools I have tried (diff, diff --minimal, wdiff, kdiff3, meld) fail ...
user avatar
7 votes
1 answer
374 views

Why is GNU diff such a memory hog? [closed]

There are enough questions asking how to diff large files, as diff can't handle them. I'd like to know why GNU diff can't handle them. I did a tiny experiment. I diffed two identical datasets, ...
user avatar
  • 288
0 votes
3 answers
248 views

Local Github Compare View

I am pretty new to github, and really appreciate its compare view: it shows the differences between diffenent versions, and allows users to comment on each change. I hope I can do the same thing ...
user avatar
  • 121
2 votes
3 answers
2k views

How to diff three binary files to show only what changed between 1 and 2 and then changed back between 2 and 3?

I have three binary files (memory dumps). Call them file1, file2, file3. I'm trying to debug some software, and I'm toggling a switch. file1 = switch off file2 = switch on file3 = switch off I need ...
user avatar
1 vote
0 answers
70 views

vimdiff show differences with only parent rows

Two config files contain many blocks of the form block name { ..... sub block name1 { ......... sub block name2 { .... } } ..... } Example: Input (LHS) : ltm ...
user avatar
  • 103
0 votes
0 answers
28 views

How to set up diff so that it copies all modified and new files and subfolders recursively from a folder at a given interval?

How to set up diff so that it copies all modified and new files and subfolders recursively from a folder at a given interval? Hi, I have a folder (A) with a large number of subfolders. I want to ...
user avatar
  • 338
2 votes
1 answer
84 views

Compare and partly merge multiple projects without common ancestor

I'm looking for a way to compare/diff 3+ different, strongly related projects, none of which is the others' common ancestor and copy around ("merge") single chunks, and specifically test files. I do ...
user avatar
  • 23
0 votes
1 answer
166 views

How to diff two files with same number of lines, and get only different lines

Given 2 files which have the same number of lines, is it possible the get a diff with ONLY change (c), in other words, WITHOUT additions (a) and deletions (d)? For example, here are 2 files with 10 ...
user avatar
  • 131
0 votes
1 answer
384 views

use diff against text files with list of files to find different files by size and/or modified date/time

I need to compare two folders to find files that are either: different size and/or modified date/time missing from one I cannot run diff against the two folders in my situation. My plan was to use ...
user avatar
0 votes
2 answers
345 views

How to do a line insensitive difference (diff) in linux?

I have two text files where the order of lines does not matter. I want to find out the lines that are different in one file to the other. Using diff in linux finds the difference but also accounts for ...
user avatar
  • 135
1 vote
2 answers
6k views

Compare three or more Word documents (*.docx)

I've seen multiple questions and answers for how to compare two Word documents, and I've seen some questions and answers for how to compare three or more raw text files, but I'm struggling to find a ...
user avatar
  • 311
0 votes
1 answer
932 views

How to expand all sections in Text Compare of Beyond Compare?

I have a bunch of code differences in the Text Compare view of Beyond Compare... but they are easier to understand if the context of that block is expanded. I have many of these sections, and it's ...
user avatar
  • 133
2 votes
1 answer
855 views

diff each individual line in first file against all lines in second file?

I have 2 TCL representations of a project that get generated by 2 different versions of the same tool, let's call them v1.tcl and v2.tcl These logs are normally logically identical for all intents ...
user avatar
2 votes
0 answers
237 views

What are the most reliable attributes for comparing two files in order to confirm/verify they are 100% identical?

I had the following situation: I copied 5.5 TB worth of data (in total over 100,000 directories and 10 million files) from an old disk to a newly-purchased external disk. I used Ultracopier on ...
user avatar
  • 21
1 vote
1 answer
164 views

Git list of Files with more than 'n' modifications of last commit with respect to current dirty state

With a huge repository, it becomes challenging to track changes. Github displays one statistic per file (total number of lines modified; includes add or deleted as well). Can we list that statistics ...
user avatar
  • 341
4 votes
1 answer
2k views

Ignore line endings when using Rsync

I want to sync two directories. The first one has CRLF and normal line endings, the second directory also has files with CRLF and normal line endings. The problem is, when I execute this code: ...
user avatar
  • 43
0 votes
2 answers
717 views

pros and cons of incremental vs differential backup? [closed]

Back In Time says it saves full copies of changed files. And it links unchanged files via hardlinks. So this is a incremental backup. What are Pros and Cons of an incremental backup (like done with ...
user avatar
0 votes
2 answers
697 views

What is causing these two apparently identical files to have different hashes?

I am unable to figure out why the following two files are yielding different hashes (SHA1, CRC32, SHA384, whatever): https://cdn.jsdelivr.net/npm/jsonify-error@1.2.1/dist/jsonify-error.js https://...
user avatar
  • 167
0 votes
1 answer
46 views

Does diff list all different lines after comparing two files?

diff file1 file2 Does diff file1 file2 list all different lines between file1 and file2 ,including all unprintable chracters ?
user avatar
  • 53
3 votes
1 answer
2k views

Ignore certain changes in git diff

Is it possible to get a report from git diff or related commands that excludes a certain category of change? I've been asked to review a change where a huge number of files have undergone the ...
user avatar
  • 131
1 vote
1 answer
2k views

Windows 10 fc command : Comma separated file comparison

I have two file's with 3 GB each to do a comparison and store the difference data into third file. Following is the sample data. File 1: June_01_2018.csv File 2: June_02_2018.csv Note: I want to ...
user avatar
  • 113
0 votes
2 answers
1k views

Comparing two large files in Linux without exhausting memory

I am using diff file1 file2 and getting memory exhausted exception. file1 and file 2 are 10 GB each. I tried diff --speed-large-files file1 file2 but that didn't work. How can I compare two files ...
user avatar
0 votes
1 answer
56 views

diff on contents of a file

i'm trying to do a diff on two files and compare the contents and if they are different send an email. Below is my script that I cannot get to work for some reason. Any suggestions are welcome. #!/...
user avatar
2 votes
2 answers
4k views

Use diff to find difference in the output of two grep command

Is it possible to diff the output of two grep commands? I am currently searching for files, using different exclude patterns, and the output it pretty long, so i wanted to see if my new pattern ...
user avatar
2 votes
1 answer
1k views

Compare XML structures

I have 2 XML files. Their content is very different. But they differ not so much in the structure. Let's say the first XML implements a standard in version 1.0 and the second XML file implements the ...
user avatar
  • 411
0 votes
1 answer
296 views

How to save diff output between two directories?

I'm running diff -rq linux-4.15-rc9/ ubuntu-bionic/ > ubuntu.diff but the output is just a bunch of lines with: Files linux-4.15-rc9/tools/perf/util/metricgroup.c and ubuntu-bionic/tools/perf/...
user avatar
4 votes
3 answers
575 views

How to compare two files and output lines which do not appear in the first?

If I have a file A containing a list of fields: 2017-04-23 2017-04-30 2017-05-07 2017-05-14 2017-05-21 2017-05-28 2017-06-04 2017-06-11 2017-06-18 2017-06-25 And another file B containing a list of ...
user avatar
  • 756
1 vote
2 answers
747 views

How to compare multiple (thousands) of PDFs?

I have two collections of PDFs. One (collection1) is 1000+ PDFs, much larger in file size (100+GB), and in illogical sections (think pdf 1 (1), 1 (3), ... when it could and should just be one file). ...
user avatar
  • 388
1 vote
1 answer
815 views

Watch + pipe + multiple arguments

I have a command diff -y <(xxd FILE) <(xxd FILE_) | colordiff and i want to put it into watch routine. Something like that: watch -n 0,1 'diff -y <(xxd FILE) <(xxd FILE_)' But i have an ...
user avatar
  • 13

1
2 3 4 5 6