473,511 Members | 15,818 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

cksum problem in unix

3 New Member
I am trying to compare cksum of 5 files in four different directories . The cksum of files in three directories on same server is same but the cksum of the files in the directory on another server is different. why is this happening?

Output on one server:
2741269201 1822 NRBGDWTESPTE0000002
475751410 11887 NRBGDWTESPTE0000003
917092061 22198 NRBGDWTESPTE0000004
1352351944 18683 NRBGDWTESPAT0000005
1606943972 2908 NRBGDWTESPAT0000006


and on another:

3867478739 1822 NRBGDWTESPTE0000002
45210552 11887 NRBGDWTESPTE0000003
734824348 22198 NRBGDWTESPTE0000004
3795910800 18683 NRBGDWTESPAT0000005
2828274160 2908 NRBGDWTESPAT0000006




The code I am using to get cksum from remote server is :
check_sum=`ssh $bound_host " cd ${dest_dir}; ls -lrt $l | cksum $l "`
Jan 11 '10 #1
4 3566
RedSon
5,000 Recognized Expert Expert
It happens because the files are different?
Jan 11 '10 #2
shabinesh
61 New Member
The hash code is unique for different files, and a file cannot have different hash codes. the fourth file must have changed or it should be different.
Jan 12 '10 #3
amitv
3 New Member
But my script is copying the same files to all the directories as u can see file sizes are same
Jan 12 '10 #4
RedSon
5,000 Recognized Expert Expert
File sizes don't mean much. You can tell this because the check sum is wrong.

Try a different check sum algorithm. Like MD5 or one of the SHAs.
Jan 12 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
4104
by: Matthew | last post by:
How would I go about creating a simple "hello world" program that will run in Unix. I am using MS Visual C++.
5
2703
by: jrefactors | last post by:
when people say unix programmer, does it mean they write programs in unix environment,and those programs are run in unix platform? it is not necessary they are using unix function calls? I heard...
22
3043
by: Ryan M | last post by:
I've been programming for a while, but most of my experience is on unix. How do C compilers work on operating systems that weren't written in C? And that have no libc? Compiling C on unix seems...
5
3510
by: markus | last post by:
Hi, I have a question that deals with the standard c library VS (Unix) system calls. The question is: which header files (and functions) are part of the C library and which header files (and...
18
5628
by: Sharon | last post by:
is microsoft going to develop .Net for Unix? or at lest CLR for Unix? 10x
15
5843
by: Alpha | last post by:
I was told that Unix API can only be called using C++, ATL and MFC. However, I was also told that C# can do that through Pinvoke to a DLL that interfaces with the Unix API. Can someone direct me...
191
7703
by: Xah Lee | last post by:
Software Needs Philosophers by Steve Yegge, 2006-04-15. Software needs philosophers. This thought has been nagging at me for a year now, and recently it's been growing like a tumor. One...
22
3632
by: Xah Lee | last post by:
The Nature of the “Unix Philosophy” Xah Lee, 2006-05 In the computing industry, especially among unix community, we often hear that there's a “Unix Philosophy”. In this essay, i...
1
1802
by: Marcin Wiszowaty | last post by:
Hello, I work at a company that has 2 development enviroments. One Unix which i dont know anything about and the othe vs.net 03 with MSSQL server 2000 for db. How can i cause applications...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.