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
1 answer
115 views

exclude all directories and subdirectories from du/diff command in calculations

I would like to find difference in bytes in files. However, du/diff command with -a list also directories and subdirectories. I want only the files in subdirectories and directories, not these ones. I ...
Estatistics's user avatar
0 votes
0 answers
8 views

Diff with white spaces and different numerical precision

I have two files: $cat a.txt 1 72200 1 1.000000000000000 1.109393E+01 3.670034E-01 0.000000E+00 1.109333E+01 3.669835E-01 3.636971E-02 1.110000E+01 0....
Manolete's user avatar
  • 111
1 vote
0 answers
111 views

How reliable is diff?

I copied a large directory from one volume to another (using rsync) and subsequently wanted to check whether the copy was indeed correct to verify the integrity of the data. To avoid the lengthy file ...
Alex Ixeras's user avatar
-1 votes
2 answers
249 views

TortoiseGit: How to show files with differences between branches before merging

Merging in TortoiseGit will automatically merge a file to the latest code if there are no conflicts. However, I'd like to choose some blocks to merge only (the files don't conflict). Is it possible to ...
Dee's user avatar
  • 641
0 votes
0 answers
12 views

in diffutils: is there a way in diff output to let diff mark the name if it is a file name or a subdir name?

in diffutils: is there a way in diff output to let diff mark the name if it is a file name or a subdir name? when diff shows only in A: fileORdirname it is often important to know if the name is a ...
Anton Wessel's user avatar
0 votes
0 answers
182 views

Use newline as delimiter and pass as argument in bash

I'm trying to make a script that shows the differences between 4 similar repositories. This makes the most sense in bash, but I'm unable to delimit on newlines in just a way that I can use it as an ...
Herman's user avatar
  • 101
0 votes
1 answer
97 views

borg backup is processing all files instead of modified

please advise how to correctly make borgbackup to process and copy only modified source files and their diffs to destination? every week we make our data snapshot in cephfs: /data/.snap/snap1/ /data/....
Gena Mrt's user avatar
0 votes
0 answers
59 views

How to remove the "+" and "-" after a diff comparison

I compare 2 files using Cygwin (MobaXterm) diff. Output files have -- a and ++ b lines at the first line. I want to delete only these lines. How could I do it? Here's my script: #! /bin/bash sort -...
susik's user avatar
  • 633
1 vote
0 answers
168 views

Compare two large text files with NO newlines

I have two large (2-3MB) text files with only a few hundred characters different. Normally diff would work fine for comparing them to find the differences. But although it's a text file, there are NO ...
Manius's user avatar
  • 113
0 votes
0 answers
107 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-...
user1736049's user avatar
3 votes
3 answers
3k 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 ...
Gonçalo Peres's user avatar
0 votes
1 answer
86 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 ...
Merk's user avatar
  • 101
0 votes
1 answer
66 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/...
Shahriar's user avatar
  • 175
1 vote
1 answer
704 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 ...
Mike Samuel's user avatar
0 votes
3 answers
439 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 ...
Motivated's user avatar
  • 219
0 votes
1 answer
101 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 ...
cjfp's user avatar
  • 11
1 vote
0 answers
70 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 ...
tsh's user avatar
  • 111
16 votes
3 answers
7k 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 ...
intel_chris's user avatar
0 votes
1 answer
950 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 ...
Francesco Ghizzo's user avatar
0 votes
1 answer
2k 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 ...
Leon D's user avatar
  • 188
0 votes
0 answers
17 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 ...
M4rk's user avatar
  • 101
1 vote
1 answer
185 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] =...
Tiina's user avatar
  • 2,950
0 votes
0 answers
24 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?...
PawelC's user avatar
  • 123
2 votes
1 answer
348 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 ...
shelper's user avatar
  • 615
3 votes
2 answers
8k 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 ...
btongeorge's user avatar
0 votes
1 answer
385 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 ...
salwa17's user avatar
  • 11
1 vote
1 answer
255 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 ...
Kobus Myburgh's user avatar
1 vote
0 answers
402 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 ...
GameRaccoon's user avatar
0 votes
1 answer
88 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 ...
weshouman's user avatar
  • 241
0 votes
0 answers
427 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(...
Shalomi90's user avatar
  • 103
2 votes
2 answers
502 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 ...
John Pardon's user avatar
7 votes
1 answer
434 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, ...
nyov's user avatar
  • 297
0 votes
3 answers
434 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 ...
Student's user avatar
  • 121
2 votes
3 answers
3k 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 ...
authur1234's user avatar
1 vote
0 answers
139 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 ...
itsraja's user avatar
  • 103
0 votes
0 answers
34 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 ...
Vesa's user avatar
  • 418
2 votes
1 answer
105 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 ...
Andy's user avatar
  • 23
1 vote
1 answer
636 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 ...
Ron Lau's user avatar
  • 141
0 votes
1 answer
1k 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 ...
IMTheNachoMan's user avatar
0 votes
2 answers
960 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 ...
pnkjmndhl's user avatar
  • 132
1 vote
2 answers
8k 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 ...
zr00's user avatar
  • 321
1 vote
1 answer
1k 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 ...
nmz787's user avatar
  • 143
2 votes
1 answer
1k 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 ...
IDLacrosseplayer's user avatar
2 votes
0 answers
250 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 ...
fesom's user avatar
  • 21
1 vote
1 answer
551 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 ...
Porcupine's user avatar
  • 415
5 votes
1 answer
3k 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: ...
Sergio's user avatar
  • 53
0 votes
2 answers
967 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 ...
ArchLinuxTux's user avatar
0 votes
2 answers
1k 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/json[email protected]/dist/jsonify-error.js https://...
Pedro A's user avatar
  • 177
0 votes
1 answer
58 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 ?
showkey's user avatar
  • 89
5 votes
1 answer
3k 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 ...
jsharp's user avatar
  • 151

1
2 3 4 5 6