Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [diff]

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

0
votes
1answer
52 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 ...
0
votes
0answers
15 views

Delete identical files from file trees with diff

I'm updating my Drupal environment by comparing the currently live file structure with the latest patch level of Drupal core (official tarball). On Windows I used to use WinMerge for the job, but ...
0
votes
2answers
35 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 ...
0
votes
1answer
65 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 ...
0
votes
1answer
19 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 ...
2
votes
1answer
106 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 ...
2
votes
0answers
104 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 ...
1
vote
1answer
20 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 ...
0
votes
0answers
20 views

How to prevent GIT Diff to compare similar lines distinct only by \r\n?

I would use GIT DIFF to compare change between 2 files. To do that, I use following command git.exe diff --ignore-all-space --ignore-blank-lines --diff-algorithm=minimal --no-index ./...
3
votes
1answer
149 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: ...
0
votes
2answers
60 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 ...
0
votes
2answers
44 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://...
0
votes
1answer
25 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 ?
2
votes
1answer
501 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 ...
1
vote
1answer
335 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 ...
0
votes
1answer
47 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. #!/...
2
votes
2answers
504 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 ...
0
votes
1answer
37 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 ...
0
votes
1answer
70 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/...
4
votes
3answers
66 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 ...
1
vote
2answers
118 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). ...
0
votes
1answer
333 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 ...
2
votes
1answer
232 views

Windows, How come Diff.exe reports an error?

We have 3 files in 3 directories: d:\run.exe d:\temp\RunShortcut = d:\run.exe s:\temp\RunShortcut = d:\run.exe The above 2 shortcut files are 433 bytes each and shortcuts are present in ...
4
votes
1answer
172 views

Is there a ZFS-aware diff?

I often make snapshots of a ZFS volume (containing AOSP) make some changes (often extracting ZIP files over then top, or running scripts) and then run diff to see what has changed. This is really ...
6
votes
1answer
2k views

Git: Performing a diff between two stashes

Is it possible with Git to perform a diff between two stashes? For instance, I have the following stashes: stash@{2}: On peformanceFix#3: 20170728T164841 stash@{3}: On peformanceFix#2: ...
1
vote
0answers
49 views

diff won't work recursively

I'm trying to recursively diff two directories using the command line diff util. I have two folders, diff1 and diff2, with contents like this: diff2 is empty. But when I do diff -r diff1 diff2 I only ...
0
votes
0answers
70 views

password is in clear text within ssh

I understand this is related to sshd_config below: PasswordAuthentication yes What I don't understand here is my command below: diff <(ssh rx52019@hostname ls -R /home/rx52019 ) <(ls -R /home/...
0
votes
1answer
199 views

diff says files are different even after sync with rsync

To synchronise two directories, I run diff -r -q path/to/dir1 path/to/dir2 1>/dev/null if [[ $? == "0" ]] then echo "Directories are exact copies of each other" else rsync -av --delete path/to/...
0
votes
1answer
193 views

Object expected Microsoft JScript runtime error 800A138F when viewing diffs inside of TortoiseSVN update log

After I get an update, I double click a JavaScript file in my update log and get the following error message: I've tried clearing everything inside of Settings -> Saved Data but I still get errors. I'...
0
votes
0answers
99 views

P4Merge, WinMerge, DiffMerge – do they work locally?

Does anyone know whether P4Merge, WinMerge and DiffMerge are independent standalone applications or they use a remote server to execute the diff/merge analysis? If they use a remote server then the ...
0
votes
2answers
915 views

WinMerge says two files are identical when doing a diff on the directory, but comparing the files shows differences

I have two folders on my desktop, PreChanges and PostChanges. PostChanges contains a few more files than PreChanges, but otherwise everything in one appears in the other. If I use WinMerge to ...
1
vote
2answers
272 views

diff-so-fancy to compare files not under git version control

I really like the character-level highlighting of diff-so-fancy. How can I use it to compare files without using git?
1
vote
1answer
60 views

patch file based off single line

i have a file: unreliable, random content, multiple lines this_line_is_always_the_same_and_never_repeated_in_file unreliable, random content, SINGLE line unreliable, random content, multiple lines ...
0
votes
1answer
167 views

Make doesn't find cmp even though it exists

Trying to run make in cygwin, I get the following error message: $ make clean Error: cmp command not found, please install diffutils ../../../../Makefile:489: recipe for target 'clean' failed make: **...
0
votes
1answer
498 views

bash: why use “treat all files as text” flag with the diff command?

I see a few examples when using the diff command, particularly using it recursively for checking whole directories, to use "diff -ar foo/ foo2/". If I'm checking a bunch of mixed files (some text, ...
1
vote
1answer
3k views

I forgot to activate Track Changes in a Word document. How to highlight my edits?

After I saved the document and closed Word, I realised that I forgot to activate Track Changes. I have a copy of the previous revision. How can I highlight my (too many) edits before sending the ...
1
vote
1answer
433 views

Compare two documents, find similar sentences

I am trying to compare two text files documents (40 pages+) that seem to have similar sentences scattered around them. I would like to detect these similarities somehow. The first idea that popped ...
1
vote
1answer
1k views

Diff: How do you only compare the first n characters in each line?

I have two log files that are being generated from a decoded binary data. The decoders are slightly different, and I am trying to isolate the differences in the output. To do this, I am diffing the ...
0
votes
1answer
199 views

How can I compare a .zip's files to the non zip version?

I'm using 7-zip. I want to compare a huge backup Zip file (200GB) to the unzipped files. (I'm guessing the files are the same, but want to make sure without unzipping 200 GB) I've tried using Beyond ...
2
votes
1answer
413 views

How to get Side-by-side layout in Beyond Compare 4's Picture Compare

Beyond Compare 4's Picture Compare has 2 images on top and the composite image below. This suits landscape images, but wastes plenty of space for highly portrait images on 16:9 monitors: This video ...
0
votes
1answer
337 views

exclude socket files during diff -r

diff has an option --recursive (-r) to do a comparison between two directories (the files inside them). Is there a way to make diff ignore all socket files and only socket files? I am using diff --...
0
votes
1answer
231 views

What are these odd characters appearing when I use P4Merge with TortoiseSVN?

When comparing files, I get these characters at the start of the diff. Image of the strange characters I'm not sure exactly what more information to provide, but will be watching this question if ...
3
votes
2answers
3k views

Is it possible to have meld open all files at once when used with “git difftool”?

Meld is capable of loading many files at once (in tabs). However when used with git difftool, Git will ask if you want to view each file (which can be slow and annoying to have to keep opening and ...
1
vote
2answers
2k views

compare and find differences of 2 huge text files (50 gb)

I want to find the differences between two text files (more than 50 GB) each. I tried diff but, I got memory exhausted problem. I am using Windows7. My code is in PHP. I was calling diff from my ...
-1
votes
1answer
83 views

How can you pass output of find command to a diff command with multiple files?

I find 5 files ending with .csv. Now I want to compare the content of these files using diff command. How can I perform both actions in one command on a Linux terminal on bash? I want to do something ...
0
votes
1answer
35 views

Using 'diff' compare usernames from file1 to file2 containing emails

I am trying to identify active accounts over dead accounts and was wondering if diff along with grep or sed or regex can be used, instead of writing a long program. File1 (usernames) ...
0
votes
1answer
43 views

How to get the difference between 2 cells

I have an Excel file like below. The value in column C should be the difference between A and B (A is always longer, B is always A substring). If both values in A and B are same, C will be empty. ...
3
votes
2answers
3k views

diff stop after first difference

I'd like to perform a diff on 2 files and have it cease at the first difference. I don't require that the command be done via diff, of course, but I do require that the actual command cease once the ...
1
vote
2answers
121 views

How can I diff two files and get what is different in the second one as an output

What's easiest way to diff two files, check what is different in the second one and get it as output? I'm comparing two css files, and rest is the same only colors are different. PS: I also want to ...
4
votes
1answer
618 views

How to send a delta (differential part) of a large binary file over the Internet?

I have sent a large (>1GB) binary file to a friend over a slow metered data plan and now I need to send the second version of the same file only slightly changed. I want to send only the delta/diff-ed ...