How to check the files are Identical or not?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to check the files are Identical or not?
# 1  
Old 07-04-2005
How to check the files are Identical or not?

Hi,

I am taking backup in every hr and every day, I want to programmatically check my backup files are identical with original files. Any methods are available in Unix scripts? Any idea.? I don't want to download both and compare, I looking for idea to develop a script to read both files and compare.
# 2  
Old 07-04-2005
Take a look at the diff command.

Cheers
ZB
# 3  
Old 07-05-2005
Or the cmp command.
# 4  
Old 07-06-2005
Or checksums of some sort (like md5sum for example)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get CRC check sum of files in java EAR file without extracting .jar/.war files to disk.?

unzip -v gives CRC info of each file in a zip(in my case .EAR) file. # unzip -v my-application.ear Archive: my-application.ear Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- 197981 Defl:N 183708 7%... (1 Reply)
Discussion started by: kchinnam
1 Replies

2. Shell Programming and Scripting

Perl code to check date and check files in particular dir

Hi Experts, I am checking how to get day in Perl. If it is “Monday” I need to process…below is the pseudo code. Can you please prove the code for below condition. if (today=="Monday" ) { while (current_time LESS THAN 9:01 AM) ... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies

3. Shell Programming and Scripting

need a shell script to extract the files from source file and check whether those files existonserve

Hi, I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is # echo $0 -sh My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
Discussion started by: muraliinfy04
13 Replies

4. Shell Programming and Scripting

How to change value in CSV columns and compare two files where Column1 is identical

Hi all, Could someone help me with the following issue: 1st I have an CSV file delimiter is ";" I I have a column 7 where I need to do some multiple mathem. operation, I need all values in this columns to be multiplied by 1.5 and create a new CSV file with the replaced values. 2nd. I... (3 Replies)
Discussion started by: kl1ngac1k
3 Replies

5. UNIX for Dummies Questions & Answers

more than 10 identical lines

I have a file that looks like this 10 user1s, 5 user2s and 10 users3. 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.1 user1 10.10.1.2 user2 10.10.1.2 user2 10.10.1.2 user2... (7 Replies)
Discussion started by: lawsongeek
7 Replies

6. Solaris

Mirroring using non-identical disks

I've been testing mirroring root partitions for the past few days within a virtual environment and on an old ML350. However, the live system that this is practice for has two disks, and they're non-identical. I've done a bit of searching through the forum and see that a lot of people recommend... (2 Replies)
Discussion started by: lm69a
2 Replies

7. Shell Programming and Scripting

to get two almost identical rows into one

Hi All, I am having hard time in getting two almost identical rows into one, I know how to do if starting word is unique, anyhow this is my problem Input File: issue1 5167 dum 1 1 kkk 7888 dum 2 1 ffff 7888 dum 2 2 llll 7888 dum 3 1 eee 7888 issue2 7667 dum 2 1 jjjj 8999 dum 2 2 jjjj... (3 Replies)
Discussion started by: ricky315
3 Replies

8. HP-UX

Problem running out of space by copying files to identical filesystems

I am trying to copy a filesystem from one server to another using rsync over the WAN. As far as I can tell, the two filesystems are identical but for some reason I cannot copy the last file because I keep running out of space. SERVER 1: mkfs -m <lvol> mkfs -F vxfs -o... (1 Reply)
Discussion started by: keelba
1 Replies

9. Shell Programming and Scripting

Check if 2 files are identical byte-to-byte?

In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server. For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match. Please... (4 Replies)
Discussion started by: krishmaths
4 Replies

10. UNIX for Dummies Questions & Answers

du -s -k differences between two identical directories

I tarred a directory from a linux server to a solaris server. When I do a du -s -k on the directory, I get almost 150k difference in the file sizes. If I do a ls | wc -l, it is the same. If I look at the size of the individual files, it is the same. I did an ls on the 2 directories and... (6 Replies)
Discussion started by: csgonan
6 Replies
Login or Register to Ask a Question