I've been using a script to compare the MD5sum of a CD and the ISO used to burn the CD. This script works great in Fedora 8 but in Fedora 12 it returns a different check sum for the CD and ISO.
Code: #Compares the checksums of an iso9660 image and a burned disk. #This script is released into the public domain by it's author. if [ -n "$BASH" ]; then shopt -s expand_aliases fi
Have great F13. Step 1 in upgrade:to F14 [root@localhost ~]# preupgrade Loaded plugins: blacklist, whiteout No plugin match for: rpm-warm-cache No plugin match for: remove-with-leaves No plugin match for: auto-update-debuginfo [root@localhost ~]# What do I do about the no plugin matches???
ABD : 5869 events, relative ratio : 1.173800E-01 , sum of ratios : 1.173800E-01 VBD : 12147 events, relative ratio : 2.429400E-01 , sum of ratios : 3.603200E-01 SDF : 17000 events, relative ratio : 3.400000E-01 , sum of ratios : 7.003200E-01
I have two files with user DN's that exported from two different LDAP directories. I wanted to write a script that reads(checks) users (cn=user1) in file Ack to see if users(cn=user1) exists in file B and give me nice output with what users are missing in file B.I have around 30k users in file A with following format..Quote:
I want to compare the following two tab-delimited .txt files (both were subsets of the original files) by comparing Columns 3 and 4 simultaneously. It is easy to compare C3 because both C3s are just numbers. But how to compare C4s?Basically, in File1, "G,G" = G in File2, "C,C" = C in File2, "A,A" = A in File2, "T,T"= T in File2.In File2, A/T in Column4 just equals "A,T" or "T,A" in Column4 of File1. C/T in Column4 just equals "C,T" or "T,C" in Column4 of File1, and etc.
I need to create a script that will compare the differences between two folders and then to copy only the updated and new files only to another directory. I know I need to use rsync here, I can write scripts so really it not how to create a script it is how do I accomplish the transfer of only new or changes files between two folders to a new file. Do I need to link these two folders first and then use the "--compare-dest" switch.
I'm writing a script using ksh that diffs two dirs that contain about 30 files, and writing the results on a logfile. When files differ, it writes the difference with no problem, but I also need the script to write a message if no differences are found.
Code: $sql="SELECT table1.datetime, table1.user_id, table2.ip, FROM table1,table2 WHERE id='$id' AND (table1.id = table2.id AND table1.datetime = table2.datetime)";
In table2 the datetime fields are about 1 to 2 seconds off due to the source of the data, which I cannot change.
Is it possible via a query match table1.datetime & table2.datetime by HH:MM (ie. to the minute instead of to the second)?
I am trying to get a checksum for a file in a subscripted variable in a bash script. md5sum outputs a checksum and the name of the input file. For example:
Code: eval CSUM$K=$"(md5sum file)"
This might return something like this:
Code: 3cff5d5c0113959d0be62be34b97e05c file
I want to assign just the checksum to the variable in my shell script and omit the file name that follows. Is there something besides md5sum that will generate a checksum? Or if not, then I was thinking I might be able to extract the checksum without the file name using sed.
What i am trying is to check the file duplication in a folder and remove a file if it is a duplicate of another file ie the contents are duplicate; but names may be same.
Basically i am using md5sum to calculate the md5sum values of each file and redirecting to a file. And i am thinking of comparing the md5sum values.But i am finding it hard to decide how to complete the code after redirecting the output of calculation of md5sum to a file.
I am trying to compare a list of patterns from one file and grep them against another file and print out only the unique patterns. Unfortunately these files are so large that they have yet to run to completion. Here's the command that I used:
Code: grep -L -f file_one.txt file_two.txt > output.output Here's some example data:
I'm looking for a fast way to verify a copy of a folder with 150Gigs of data, in 33 files. Some of the files are a few kb, while a few are 20-30Gigs. I've done a file count, which is quick, but doesn't verify that all the files are intact. I tried running md5sum on them, which works, but will probably take as long as copying the files in the first place. Diff works too, but is slow too.
I noticed something a little odd I'm hoping someone can enlighten me on. I noticed in a couple of cases that a package has the proper version, but differs in two regards.
1. The package ends up with a .el4 on the end of the version for Red Hat 4.
2. The actual MD5Sum of the files the package provides differ.
An example below:
Code:
[root@RH4ES32-MCE bin]# for i in `rpm -ql GConf2`;do md5sum $i;done; md5sum: /etc/gconf/2: Is a directory 9f90335546f7c57ae6fb552cc2b919c5 /etc/gconf/2/path md5sum: /etc/gconf/gconf.xml.defaults: Is a directory
[code].....
So my package changed slightly to now show .el4 versus just 2-2.8.1-1 I've indicated in the first output above that the first couple of lines differ. I stopped my comparison at that point as they truly are different.
I am using the diff command with the -r option, to compare a large number of files and files in subdirectories. My main interest is to find out which files have been changed, and not what the actual changes are, and since a lot of files has been changed, it would be a lot easier to view the file names only. Is there and option for diff that might do this, or does there exist a similar tool/command that could do the job?
I created a file holding all the md5 values of my files to find duplicates as follows: find /mnt -type f -print0 | xargs -0 md5sum >> ~/home.md5
I then tried to find duplicates and do ls -l on the result in such way: cat ~/home.md5 | awk '{print $1}' | sort | uniq -c | sort -nr | awk '{print $2}' | head -n 10 > ~/top10.md5
Now I attempted to do an ls -l on the files using the command: for i in `cat ~/top10.md5`;do grep $i ~/home.md5 | while read checksum path; do echo "`echo $(printf '%q' "${path}")`" | xargs ls -l; done; done
This works well on most files, however it does not work when filenames have special letters in them that gets escaped such letters with accent etc. These become for examle 303.
Are there any ways I can use the escaped 303 strings with path names, or any better way I can do this?
I would like to make a one-liner, which diff's "ps aux" output before and after killing a process. So basically it should be a combination of fallowing commands: 1) diff -u 2) ps aux | awk '{print $2}' 3) kill `ps aux | grep [c]ron | awk '{print $2}'` 4) ps aux | awk '{print $2}'
How to achieve this? Something like this: Code: diff $( kill `ps aux | grep [c]ron | awk '{print $2}'` && ps aux | awk '{print $2}' ) $( ps aux | awk '{print $2}' ) I don't have pgrep or pkill available.
I am trying to write a program in C which compares two files and prints the line that is equal.
Here file1.txt has
and file2.txt has
Note: file2.txt consist of only a single string where as file2.txt has multiple lines. Actually im comparing two files with md5sum values.
Here is the code but it compares only first line of files..but it should compare the whole file1..and sorry iam a beginner in C can any1 sujest some modification to this code so that..it can compare file2 with entire file1
In order to upgrade a machine that can not successfully upgrade to 10.4 I downloaded and burned the 10.04.1 iso image off the ubuntu alternate download site. In my first attempt I unsuccessfully burned the image with it failing at the very end. I did perform an md5sum on it and received the precise output I got from my second burn attenpt which DID complete successfully. Here is the output:
[code]...
I did research this last night and it seems the common wisdom was to reburn the iso (which I did twice) or copy down the iso again. This I also did and it came down precisely, bit for bit, the same as the first one. Here are the two cksums
[code]...
Is there something wrong with this image on the website or is the error about 1 file being unreadable (could that also mean missing?) be erroneous?
I want to move all files and directories that are 1 month old out to back up into a separate folder. There will be a lot of files and I want to make sure it copies properly. The problem I'm having is integrating a MD5SUM into it to check integrity. MD5SUM is not recursive, so I figured it would work in a loop when it copies each individual file, I'll do a md5sum on each file and delete that md5 once its verified it copied ok.
[Code]...
I also need some sort of error handling to output all md5's that didnt pass the hash check.
I have a requirement like this:Cut the characters from each line of a file with following positions: 21-24, 25-34 ,111-120.Thse fields now need to be placed in a tab delimited output file.Currently this is how I am achieving it:
I have a database of around 4000 files. I use rsync script to transfer from 2 separate updated hdd every month but I need a way to compare a .txt file or .xml file to the updated drive as I cannot use rsync delete because I can not mount all 3 drives at the same time?
I want to compare two files in perl, I have two files file1.txt & file2.txt. if column1 on file2.txt match column1 on file1.txt then I want my result on file3.txt (column1 column2 file1.txt + column1 column2 column3 file2.txt). this problem was solved with "awk" but I want to do in perl.