Questions tagged [diff]

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

Filter by
Sorted by
Tagged with
158 votes
20 answers
204k views

File and directory comparison tool?

I'm looking for something that will compare directories and files like Beyond Compare does for windows. Its mainly for use of source control, but I need to use it for deployment as well.
DevelopingChris's user avatar
18 votes
4 answers
9k views

How can I "diff" two files with Nautilus?

I have installed Meld and found out it's a great comparing tool. Unfortunately there is no integration with Nautilus 3.2. This means, I can't right click on files and select an option to open them in ...
bioShark's user avatar
  • 4,251
58 votes
6 answers
96k views

Diff reports difference but both lines are the same

I diff-ed 2 files and got 1c1 < 1 --- > 1 Both files contained just "1". How is this different?
Jiew Meng's user avatar
  • 10.3k
309 votes
4 answers
157k views

How do I diff the output of two commands?

I had imagined the simplest way to compare the contents of two similar directories would be something like diff `ls old` `ls new` But I see why this doesn't work; diff is being handed a big long ...
Ternary's user avatar
  • 3,987
16 votes
2 answers
25k views

exit code of diff

If I run diff -q on two files and they are identical, the exit code generated by echo $? is 0; if the files differ, the exit code is 1. Why is that? In what way is the first diff a success and the ...
DK Bose's user avatar
  • 42.5k
15 votes
5 answers
8k 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....
Lynob's user avatar
  • 6,665
11 votes
3 answers
2k 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, ...
sancho.s ReinstateMonicaCellio's user avatar
5 votes
2 answers
3k views

Does Ubuntu have any graphical software to compare and merge differences in files? [duplicate]

I want to compare two or more files and merge the differences as needed. I was using Windows but now working on Ubuntu 12.04. In windows "Beyond compare" made my work easier, but since I ...
user2823274's user avatar
3 votes
1 answer
6k 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 ...
reducing activity's user avatar
2 votes
2 answers
209 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 ...
Eric Newman's user avatar
1 vote
0 answers
833 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 | ...
mrq's user avatar
  • 123
0 votes
0 answers
528 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 &...
musbach's user avatar
  • 1,445
0 votes
1 answer
101 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
Bleakley's user avatar
  • 171