Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [diff]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
39 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
23 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
18 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
108 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
60 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
0answers
63 views

Compare content of 2 files using diff - no such file or directory problem

May I know how can I compare content of two files? I tried these codes below but I get this message: sh: diff: No such file or directory. The commands that I tried are: plink.exe 10.3.0.121 -l ...
0
votes
2answers
60 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
734 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
149 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
67 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
82 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
511 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
131 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
768 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
224 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
158 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
34 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
2k 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
109 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
118 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
85 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
227 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
158 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
100 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
828 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 ...
4
votes
2answers
3k 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
317 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
3k 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
74 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
5k 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
338 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
242 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
61 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
221 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
834 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
21 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
126 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
187 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
229 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.
15
votes
3answers
40k 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 ...
14
votes
5answers
5k 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....
0
votes
1answer
2k views

How do I choose 2 files to compare in Meld?

I can drag two files into the Meld GUI. I can also click File comparison (see ), then choose one file, compare that to nothing, then choose the second file. This seems roundabout. I want to compare ...
1
vote
3answers
986 views

What's equivalent to this Homebrew installation command [closed]

What's the equivalent command on Ubuntu to brew install wdiff --with-gettext on Mac OS X? EDIT: I'm trying to prepare a computer for somebody else to use. His coworker usually use Mac where ...
2
votes
1answer
573 views

Graphical Diff viewer that supports LXDE (Lubuntu)

I've installed a fresh copy of Lubuntu on my netbook for the purpose of development "on-the-go". I've installed most of the tools I need except for one handy one: Meld Diff Viewer. Meld required ...
0
votes
1answer
188 views

Getting “Ambiguous input redirect.” when using diff [closed]

I'm relatively new to linux so be tender. diff shiftingV1.0 < inputTest.in shiftingV1.2 < inputTest.in Basically I want to check if there's any difference between the output of those two (...
1
vote
1answer
49 views

What is the difference between echoing strings to a file and pasting to it?

Today I tried to add Virtualbox repo to the /etc/apt/sources.list.d/virtualbox.list via echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" > /etc/apt/sources.list.d/...
2
votes
2answers
96 views

using diff to compare a file and a directory

there is probably a simpler way to do this but I ran ls on the /media/user directory with no usb storage plugged in and saved the output to a file and I wanted to use diff to compare the file with a ...