The tag has no wiki summary.

learn more… | top users | synonyms

-6
votes
1answer
62 views

Shell script to get common elements from two files [on hold]

My problem is as follows: I have two files in the following format: File 1: 1000 LSI Logic / Symbios Logic 0001 53c810 0021 53c1010 66MHz Ultra3 SCSI Adapter 1000 1000 ...
2
votes
2answers
39 views

What optimized tools are available for comparing directory contents?

I am mirroring a Subversion repository tag with svn2git and I want to be sure that when I checkout particular revisions, those I obtain from the git mirror match those from Subversion. My main problem ...
1
vote
1answer
55 views

Comparing a bunch of files on different folders

I have two folders with 200 txt files each, all files named like file1.txt, file2.txt, file3.txt, etc., on both folders. Is there a way to use one command to compare file1 in both folders, file2 in ...
1
vote
0answers
75 views

How rsync --compare-dest works

I know there's a very similar question here, but the accepted answer has nothing to do with rsync, and the OP's solution doesn't apply in my case. I'm trying to get all the updates from a CentOS ...
3
votes
2answers
156 views

Comparing two files in unix and awk

I have to compare two files, file1 and file2. Each file has 56 columns separated by |. First column is the employee number in the file, I will check whether same employee number is present in the ...
3
votes
2answers
636 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
842 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
319 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
98 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 ...
4
votes
1answer
177 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
388 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
2k 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
791 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
1k 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
740 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
103 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
7k 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
3k 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
6k 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> ...
3
votes
4answers
3k 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 ...
8
votes
2answers
12k 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
95 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
502 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 ...
5
votes
4answers
5k 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
4k 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
249 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
1k 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. ...