The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
48 views

Using Diff on a specific column in a file

Will it be possible to use diff on a specific columns in a file? file1 Something 123 item1 Something 456 item2 Something 768 item3 Something 353 item4 file2 Another 123 stuff1 Another 193 ...
1
vote
1answer
90 views

How to compare directories with binary files

I'd like to compare directories with binary files. Actually, I'm not interested in what the actual differences between files are, but to know if there's a differ (and what files differ). Previously I ...
2
votes
5answers
129 views

Finding new lines in one file compared with another

I need to compare two txt files. Every line of both txt files contain entries. One entry per line. The new file contains entries the old one lacks. I have tried to use diff and vimdiff but these don't ...
2
votes
1answer
47 views

How can we compare two same directories in linux and list different files

Suppose I have same version of linux kernel but I changed some driver lines. Is there any way to compare these kernels and list the results. The result would be helpful to go back if I changed a lot ...
3
votes
1answer
83 views

Compare two files strictly line-by-line, without insertions or deletions

I have two files that essentially contain a memory dumps in a hex format. At the moment I use diff to see if the files are different and where the differences are. However, this can be misleading when ...
12
votes
3answers
352 views

How to check whether file1 is a prefix of file2?

I have two files with sizes 124665 and 124858 in bytes and want to check whether file1 is a prefix of file2 or not.
2
votes
3answers
277 views

Compare two files for matching lines and store positive results [duplicate]

I have two files. File 1: A0001 C001 B0003 C896 A0024 C234 . B1542 C231 . upto 28412 such lines File 2: A0001 A0024 B1542 . . and 12000 such lines. I want to compare File 2 against File 1 ...
4
votes
3answers
522 views

How to know if a text file is a subset of another

I am trying to find a way to predict if a text file is a subset of another.. For example: foo bar is a subset of foo bar pluto While: foo pluto and foo bar are not one a subset of each ...
2
votes
1answer
922 views

Compare video and image (percentage of differences)

I was wondering if it's possible to get the percentage of difference between a video and an static image using avconv (from libav) I have a surveillance camera constantly providing an RTSP video ...
3
votes
1answer
535 views

How to pipe diff into Kompare?

I want to quickly compare files in two different directories to see if the files are the same (same content). I want to see the results in Kompare (I'm on KDE - Kubuntu 12.04). Here's my diff ...
2
votes
3answers
92 views

Get files on remote copy but not local

I have a folder. I have one copy of this folder locally and one on a server. I edited my local folder as I wanted and then rsync it to the server. Is there any way of comparing those two copies, ...
2
votes
3answers
4k views

Compare multiple files

I want a bash-script to compare OR find differences for multiple files which are stored in different locations: Files under /tmp/test/ A.txt B.txt C.txt Compare with files under /home/oldtest/ ...
4
votes
3answers
2k views

How can I check if two gzipped files are equal?

I am trying to save space while doing a "dumb" backup by simply dumping data into a text file. My backup script is executed daily and looks like this: Create a directory named after the backup date. ...
5
votes
1answer
5k views

how to compare two xml files having same data in different lines?

I have two files have same data but in different lines. File 1: <Identities> <Identity> <Id>048206031415072010Comcast.USR8JR</Id> ...
2
votes
4answers
2k views

Check whether two directories and their subdirectories are the same

With diff -r I can do this task, however it takes so long because diff checks file's content. I want something that determine that two files are the same regarding of their size, last modified, etc. ...
5
votes
1answer
1k views

Find all folders in a directory with the same content

In Ubuntu, is there any to find duplicate folders in a directory (i. e., folders with the same content)? I think there are already some command-line tools available for finding duplicate files (such ...
5
votes
1answer
7k views

rsync compare directories?

Is it possible to compare two directories with rsync and only print the differences? There's a dry-run option, but when I increase verbosity to a certain level, every file compared is shown. ls -alR ...
2
votes
1answer
87 views

binary compare two files, failing only if first never matches any part of the second

I have a file (call it A, for reference) that may be a fragment of some other extant file on my system. I can't use cmp because I don't know how many bytes may be missing from the start of A (or, at ...
4
votes
1answer
425 views

How to compare attributes of two files on Linux ext4

cmp(1) will of course tell me if the contents of two files are identical, but in order to test restoring from backups I also wanted to compare the relevant (!) file attributes. So if I did something ...
4
votes
4answers
4k views

Compare two files: lines present in one, not in the other, by one column comparison

I need to compare 2 files. Column 1 is the same in both files. Column 2 is what I want to compare: I want all lines in file 1 that are not in file 2 when comparing column 2. Column 3 is different in ...
5
votes
3answers
3k views

Tool to compare 2 excel sheets in linux

I want to be able to compare 2 excel sheets in linux. I am not interested in converting them to csv format as they have a complicated formating that is not supported in csv. I would like to be able ...
2
votes
2answers
213 views

How to determine if file is just a permutation of another one?

Consider for example a source code file, where the functions are drastically shuffled around. Is there is a command to check if the reordering of lines is the only change? (that means no lines are ...
6
votes
4answers
978 views

Compare an old file and new file, but ignore lines which only exist in new file?

I have two files: oldlist - This contains a list of files and a md5 hash for each file. This was generated one year ago. newlist - This also contains a list of files and a md5 hash for each file. ...