Questions tagged [diff]

diff is a file comparison utility that outputs the differences between two files.

Filter by
Sorted by
Tagged with
-1
votes
0answers
72 views

How to fix the file diff to patch on Ubuntu 20.04 about Bluetooth 5.0

I followed the steps from the website to apply on Ubuntu 20.04.1 with the Kernel upgraded: 5.8.14. 1. I copied the patch's code and paste on the text editor, and then I saved with the file's name: csr-...
1
vote
0answers
360 views

Bluetooth USB dongle 5.0 0a12:0001 doesn't work on Ubuntu 20.04

WIRELESS USB DONGLE - BLUETOOTH USB DONGLE - MINI 5.0 - VERSION 5.48 - 0a12:0001 So lately I bought a Bluetooth USB dongle - model no: MLT-5.0-MiNi I'm using Ubuntu 20.04.1 LTS. 1. After I connected ...
0
votes
0answers
55 views

Bash script for copying only modified files

I have a very large base dir called proj_base containing humongous amount of files and directories. Mostly every day I create a proj_base_ndate and copy contents previous day folder proj_base_n-1date, ...
1
vote
2answers
73 views

How do I compare equality of two files in Ubuntu?

I have two large pkl files. I'm not interested in knowing the comparisons of the contents of two files (as we do for text files with diff, meld or vimdiff). I suspect that they are the same. Their ...
0
votes
1answer
27 views

How to keep locally changed configuration files in sync with updated vanilla package versions after “apt-get upgrade”?

I'm maintaining Ubuntu 16.04.6 LTS and Debian 4.9.210-1 systems. When I apt-get upgrade, I often get the notice that my local configuration files have changes to the updated package configuration ...
4
votes
0answers
58 views

Is it possible to change default diff tool for apt (or maybe it is for shell)?

I'm not sure is it apt or shell setting or is it a setting at all but whenever there is a conflict on a configuration file while doing apt upgrade I'm presented with these options: Y or I : install ...
0
votes
0answers
356 views

Only garbage was found in the patch input file: Diff pcap files

I want to do a diff between to pcap files so I did: diff -u file1.pcap file2.pcap > file3.diff or diff --binary file1.pcap file2.pcap > file3.diff then I applied a patch : patch -i file3.diff ...
1
vote
1answer
194 views

I have a zip file. I extracted it and modified some files. How do I list them?

Basically I'd like to do a diff and list binary-changed files recursively in the folder. I want to avoid cluttering the filesystem so I think this involves some piping. I searched some examples but ...
0
votes
0answers
26 views

How to compare two files with without it doing it line-by-line or ignoring words it has already seen before? (Bash Linux)

So I am trying to compare two files. text1.txt and text2.txt and put the difference between the two files in the file text3.txt My issue is that I cannot find a way to make it eighter not check line-...
0
votes
1answer
86 views

Is it possible to visually view the differences (changes) of text files while copying them with Caja?

I have two files with the same name in two different folders. I need to copy the text file from source to destination. Usually I use Caja's Extra Pane (accessible by F3) for doing so: I remembered ...
1
vote
2answers
114 views

Display changes between old and new server

I am using a headless Linux server in an off-site location and I access it using ssh. I tried upgrading to Ubuntu 18.04 LTS 64bit because of the constant nagging that Ubuntu 14.04 was outdated, yet I ...
1
vote
1answer
270 views

Why is Meld not identifying differences?

Meld is not showing differences. In this minimal example, directories a and b are different, as shown by diff below. $ diff a/ b/ diff a/a.txt b/a.txt 1c1 < a --- > aa Only in b/: b.txt But ...
0
votes
2answers
369 views

Comparing two text files and save the missing

I have two text files: first text file: Hello Hi Hola Bonjour Second text file: Hi Bonjour How can I output the differences between them regardless the line number i.e. I want to save the ...
5
votes
1answer
2k views

Make the `diff` command look only for differences from a specified range of lines

Is there a way to make the diff command look only for differences from a specified range of lines (from from line to to line), instead of the entire file? I am having difficulty trying to find the ...
1
vote
1answer
232 views

How to configure “flatpak run org.gnome.meld” as git diff.tool and merge.tool

I can't use meld due to a messed up local installation of cairo or else. I've invested some time in it already including reporting the failure as a bug, but the maintainer states that it's not a bug ...
0
votes
1answer
71 views

Identical content search between files of different names?

I do not know if it is possible to compare the contents of text files among other files in a second folder. I need the program to only search for matching strings and if it finds them, show both lines ...
1
vote
0answers
162 views

Diff side by side output with “|” (incomplete) sign

When I compare two files with just numbers, in addition to < and > signs, I also have | signs at some of the lines. For example, 25746 | ...
0
votes
0answers
1k views

Why does diff in Terminal say “No such file or directory” when the dir. exists?

I am trying to use 'diff' in Terminal in a way that is very similar to half a year ago, but now it doesn't work. I get the "No such file or directory" error even though the directories obviously exist....
1
vote
2answers
275 views

How do you compare two root filesystems - but ignore mount points?

I have rootfs / but within that I have /mnt/another_rootfs which contains a second mounted rootfs. I want to compare the files in them... but when I do somthng like: diff -r / /mnt/another_rootfs I ...
9
votes
3answers
1k views

Compare source code files, ignoring formatting differences (like whitespace, linebreaks, …)

I am looking for an application that can compare two C++ sources and find the code-meaningful differences (to compare versions which may have been reformatted differently). At the very minimum, ...
1
vote
0answers
282 views

Binary diff file

bsdiff uses max(17*n,9*n+m) bytes of memory (where n is the size of the old file and m is the size of the new file) according to http://www.daemonology.net/bsdiff/ Is there a lighter (in terms of ...
1
vote
1answer
254 views

How to make 'diff' output line-by-line?

I have a seemingly simple question I can't find answer for. Say, I have two files: A B C D and A X Y D When I run diff -U 1000 on these, I get: A -B -C +X +Y D Instead, I'd like to get: A -...
2
votes
1answer
50 views

How to pass 3rd arg to diff which is a call to another program with multiple arguments?

I want to use diff to compare a text file with the output of a program. I realise I can redirect the output of the program to a file and then compare 2 files but was wondering if it is possible to do ...
5
votes
5answers
3k views

Comparing contents of two files

I have two files containing list of all files paths from two hard drives (supposed to be exactly the same), one of which I think has missing files. Both lists have the file path and size, but the ...
3
votes
0answers
129 views

Kdiff3 works very slowly in 16.04

After installing 16.04 I've noticed that Kdiff3 worked much slower than in 14.04. In 14.04 it worked well with 200MB files and in 16.04 even 2MB files take around 1-2 minutes to process. And 200MB ...
0
votes
0answers
156 views

using DIFF with a remote system

I would like to get the difference between two directories (not files), lets say dir1 on a local system and dir2 which is located on a remote server. From what I could find on the internet, the "best" ...
0
votes
1answer
97 views

Copy differences between two dirs to a a new dir?

Edited version to a rushed question! When I run diff on two directories ex: $ diff Linux1 Linux2 The output being $ Only in Linux2: COMPLETELYDIFFERENT22.txt I want to the copy that file(not just ...
-1
votes
1answer
344 views

How to perform binary diffing and patching with standard Ubuntu (Debian) tools? [closed]

I have two set of binary files (before and after a certain operation), and I need to perform diffing betwen the sets, and patching on the first set in order to obtain the second set. How can I ...
1
vote
0answers
227 views

convert normal diff to unified diff or use normal diff in patch

I have a normal diff file but I can't patch with it. So how can I convert this normal diff to unified diff or patch with normal diff file? Only in /tmp/ns-allinone-2.26/ns-2.26/common: misc.o diff -...
6
votes
2answers
2k views

Simple diff command output

I've seen many examples of the use of the diff command, but none detailing its basic use. Here is the content of the two files I would like to use: cat -A file1.txt a$ b$ c$ d$ cat -A file2.txt b$ c$...
2
votes
0answers
143 views

diff - How to make columns line up

I used Unity Tweak Tool to make some changes and I wanted to find out what keys it used for the changes so I dumped the db to a file like this: dconf dump / > altered_settings.ini Then I reset ...
1
vote
5answers
1k views

compare contents of two text files in ubuntu?

I need to compare the contents of text files (as a whole and not line-wise like diff command) and print out the missing text. Is there a command to do so? Thanks in advance. EDIT: As an example, say ...
6
votes
2answers
5k views

Show only right side of --side-by-side diff

I don't seem to find a way around this. Is there a one-liner to get only the right side of a diff --side-by-side output? For example: For this: diff --side-by-side file1 file2 I get either of this ...
1
vote
0answers
347 views

Meld issue with codification (one file in Chinese chars)

This is odd. Meld has two text files which were generated by the same program on different dates. One comes out fine but the other is unreadable. The issue does not exist in the terminal. I ...
1
vote
2answers
4k views

Diff command to compare files which are in first directory only

I have 2 folders whose contents I want to compare. For instance I have folder 1 and folder 2. Folder 2 has a lot of new files + some files same as folder 1 but with some changes in contents of these ...
1
vote
1answer
183 views

Exit code “1” on diff command despite getting output

user@mbp$ diff --suppress-common-lines -y file1.txt file2.txt Some output user@mbp$ echo $? 1 user@mbp$ I'm curious why it throws exit code 1 rather 0 if its giving me what I need? I realize ...
15
votes
3answers
6k views

meld shows output in unreadable alphabet (Japanese/Chinese?)

I am using meld to visualise a diff between two files. meld shows the diff output in... something like Japanese or Chinese? Any idea what could happen? A locale issue? What is strange is that when ...
0
votes
0answers
418 views

vim -d colorscheme

I need a readable colorscheme for vim -d (or vimdiff). My problem is that some lines aren't readable (see picture), white text on yellow background: I tried also the following in ~/.vimrc: if &...
0
votes
0answers
3k views

How to see difference or compare files using sublime?

Using sublime as notepad++ not available for ubuntu :( I want to see differences among two files one is from repository and another is external file, is there any way to see difference using sublime, ...
1
vote
0answers
280 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 --...
3
votes
1answer
3k views

How can I check why diff command failed?

I was running diff --brief -r /home/mateusz/ /media/mateusz/Database/backup_test_tmp_folder/home/mateusz/ command that completed with error code 2. According to documentation "Exit status is 0 if ...
0
votes
1answer
69 views

What does | mean when diff is run on two files?

When I run: diff -y <file1> <file2> what is the | character telling me? i.e. Video_Codec_List : v210 | Codecs Video : v210
2
votes
1answer
408 views

How do I make diff print duplicates only?

I'm trying to find out which files are present in two compared folders. I'm only interested in comparing filenames. Adding -s to the command does not do the trick for some reason. I want to reuse the ...
2
votes
1answer
1k views

Cronjob under Ubuntu runs slow

I configured a cronjob (running a bash script) with crontab -e which locally copies some data from one hard drive to another (rsync) and after that compares them (diff). I executed the script ...
3
votes
0answers
24 views

Nautilus: change “paste” to auto-check copied file against original

Is it somehow possible (maybe with nautilus actions?) to change the behaviour of the "paste" functionality or to add a new paste functionality that does the following: paste as normal do a diff of ...
0
votes
2answers
143 views

Keeping track of filesystem changes

I am looking for a way to find changes made to filesystem on Ubuntu. Like so: make some kind of a snapshot i.e. scan given folder (files, subfolders), save files names and sizes. install whatever, ...
1
vote
1answer
205 views

How I can install the “linux-signed-lts-vivid package” security update?

I am an Ubuntu Trusty Tahr (14.04.3 LTS 64 Bit) user. In generally I do not know how to install "diffs" patches published in the Launchpad.net. How can I install the security patch given in this ...
2
votes
1answer
260 views

How do I make a unified patch with diff?

I have two directories src and src-with-fixes. I want to make a unified patch, so people can download the src dir and the patch file and run patch -p1 < patch.diff and get the fixes in the src dir.
22
votes
3answers
48k views

Best alternative for WinMerge

I need to compare/diff/merge files in an easy way. In Dark ages when i'm a windows user I would use WinMerge. What alternatives for this are available in Ubuntu? The things I must be able to do: See ...
15
votes
5answers
6k views

Difference of two big files

I have "test1.csv" and it contains 200,400,600,800 100,300,500,700 50,25,125,310 and test2.csv and it contains 100,4,2,1,7 200,400,600,800 21,22,23,24,25 50,25,125,310 50,25,700,5 now diff test2....