12-10-2009
Help with file differences
I have two huge files in the size of 1gb. They are produced by similar processes and the expected thing is that they should match in size and contents. I have produced both the files with the processes and they seem to be off only by few bytes.
Size file name
1634502037 Transfer_delta_reservation_file.txt
1634501922 delta_transfer_file.txt
I tried to see the differences with the diff and sdiff but both of them are showing everything as different. I checked the files manually for couple of records and they seem to match exactly. I couldn't find out why there is this small difference in bytes and if so where are this extra bytes coming from. Is there a way or a program to just show the differences in the file and their line numbers. I did the diff after sorting them. Please help.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to write a script to find out if there are any .c files created/removed from the last time i monitored the files available. i first created a file to contain all the .c files available on the system. (ls *.c > file1)
I created another file using the same command.
I used the comm file1... (4 Replies)
Discussion started by: RianTan
4 Replies
2. Shell Programming and Scripting
Hello Everybody!!!!!!!!! Request you to help me with the below mentioned issue:
I have 2 files say,
File 1:
a|4|7
b|3|2
c|8|8
d|8|9
File 2:
a|4|6
b|2|2
c|8|8
d|9|8
The third file(output file) should have:
Data mismatch in row 1 column 3
Data mismatch in row 2 coumn 2
Data... (3 Replies)
Discussion started by: abhijeet1409
3 Replies
3. Shell Programming and Scripting
Hello,
I am new to scripting and have been trying to compare two different directories, but with all the same file names in each directory for file changes. I have been doing it in baby steps and have been doing pretty good, but I have hit a few snags. Test 1 and Test 2 work great, but my... (4 Replies)
Discussion started by: dmaday
4 Replies
4. Shell Programming and Scripting
I have the 2 files
File 1
ABC,1239800
BCED,890000
ABCKJK,66767
File 2
GUHJC,1239800
ABC,1239800
TYIO,5636
The thing is the no of values in file can exceed example ABC,1239800,4545465,AHHAH so i need to find those values in file 1 which do not match in File 2 so i should get... (7 Replies)
Discussion started by: dinjo_jo
7 Replies
5. Shell Programming and Scripting
Hi
Hope you are having a great weeknd !! I had a question and need your expertise for this :
I have 2 files File1 & File2(of same structure) which I need to compare on some columns. I need to find the values which are there in File2 but not in File 1 and put the Differences in another file... (5 Replies)
Discussion started by: newbie_8398
5 Replies
6. Programming
Hello,
I compiled the object file of a binary and i could see the symbol , "void*std::__node_alloc<1,0>::_M_allocate(unsigned)", this is actually present as "void*std::__node_alloc<true,0>::_M_allocate(unsigned)" in the libstlport4.so.1 . This has been verified with "nm -C " command
Please... (4 Replies)
Discussion started by: shafi2all
4 Replies
7. Shell Programming and Scripting
Can u tell the diff between the
1) $a and ${a}
2)] and ( )
3)" " and ' ' , ` `
4) 'a' , "a", please explain with simple example (1 Reply)
Discussion started by: mrbinoy
1 Replies
8. UNIX for Dummies Questions & Answers
Hi
i have gone through some sdiff command it shows the differences side by side and its really awesome
file 1:
this tool is for
checking the differ
merging with flower pots documentation
file 2:
this t ool is for
checking the differ
mergin g with flower pots documentation
... (27 Replies)
Discussion started by: rakeshkumar
27 Replies
9. Shell Programming and Scripting
I am trying to find the differences between the two sorted, tab separated, attached files. Thank you :).
In update2 there are 52,058 lines and in current2 there are 52,197 so 139 differences should result.
However,
awk 'FNR==NR{a;next}!($0 in a)' update2 current2 > out2comm -1 -3... (2 Replies)
Discussion started by: cmccabe
2 Replies
10. Shell Programming and Scripting
This seems pretty simple, but I cant figure it out. I get stumped on the simple things.
I am running two commands
1) take a listing a directory of files, and filter out the doc_name (which is in a series of extracted files), and place it in a file.
ls -l | awk '{print $9}' | grep... (5 Replies)
Discussion started by: jeffs42885
5 Replies
LEARN ABOUT MOJAVE
git-patch-id
GIT-PATCH-ID(1) Git Manual GIT-PATCH-ID(1)
NAME
git-patch-id - Compute unique ID for a patch
SYNOPSIS
git patch-id [--stable | --unstable]
DESCRIPTION
Read a patch from the standard input and compute the patch ID for it.
A "patch ID" is nothing but a sum of SHA-1 of the file diffs associated with a patch, with whitespace and line numbers ignored. As such,
it's "reasonably stable", but at the same time also reasonably unique, i.e., two patches that have the same "patch ID" are almost
guaranteed to be the same thing.
IOW, you can use this thing to look for likely duplicate commits.
When dealing with git diff-tree output, it takes advantage of the fact that the patch is prefixed with the object name of the commit, and
outputs two 40-byte hexadecimal strings. The first string is the patch ID, and the second string is the commit ID. This can be used to make
a mapping from patch ID to commit ID.
OPTIONS
--stable
Use a "stable" sum of hashes as the patch ID. With this option:
o Reordering file diffs that make up a patch does not affect the ID. In particular, two patches produced by comparing the same two
trees with two different settings for "-O<orderfile>" result in the same patch ID signature, thereby allowing the computed result
to be used as a key to index some meta-information about the change between the two trees;
o Result is different from the value produced by git 1.9 and older or produced when an "unstable" hash (see --unstable below) is
configured - even when used on a diff output taken without any use of "-O<orderfile>", thereby making existing databases storing
such "unstable" or historical patch-ids unusable.
This is the default if patchid.stable is set to true.
--unstable
Use an "unstable" hash as the patch ID. With this option, the result produced is compatible with the patch-id value produced by git 1.9
and older. Users with pre-existing databases storing patch-ids produced by git 1.9 and older (who do not deal with reordered patches)
may want to use this option.
This is the default.
GIT
Part of the git(1) suite
Git 2.17.1 10/05/2018 GIT-PATCH-ID(1)