1823064 Members
3079 Online
109645 Solutions
New Discussion юеВ

Checksum command ....

 
SOLVED
Go to solution
Manuales
Super Advisor

Checksum command ....


what do you use checksum command to?
how do you use it?


Thansk, mauales.
8 REPLIES 8
Sanjay_6
Honored Contributor
Solution

Re: Checksum command ....

Hi,

the command is used to make sure that a file when copied from one location to another has not changed because of the trasfer process, the way it was transferred.

Sometimes file copied from one location to another can change, though the byte size could stay the same.

cksum help in identifying that,

cksum file_name

This is done on the same file at both the locations to make sure the file is same / consistent.

Hope this helps.

regds
Sanjay_6
Honored Contributor

Re: Checksum command ....

Hi,

you can get help on this and most of the other commands from the hp docs site.

Here is the link for cksum,

http://docs.hp.com/en/B2355-60127/cksum.1.html

Also do "man command_name" on your server and you can find what the command stand for and what is the syntax in using that command. There are lot many variation of a command and it may not be able to understand all of them by us telling you waht the command is for.

Try the hp docs site,

http://docs.hp.com

Hope this helps.

Regds

James R. Ferguson
Acclaimed Contributor

Re: Checksum command ....

Hi Manuales:

'cksum' is used to calculate a checksum for a file. It is used to verify that a file has not been tampered with or that a file has been transferred from one place to another without corruption.

For example:

# cksum /etc/hosts
2776974690 621 /etc/hosts

The checksum is 2776974690 with 621 octets in the file.

If I (for example) swapped to octets in the file I would get a different checksum and thus know that the files were *not* the same!

See the man pages for 'cksum(1)' for more information.

Regards!

...JRF...
Deoncia Grayson_1
Honored Contributor

Re: Checksum command ....

cksum - print file checksum and sizes


The cksum command calculates and prints to standard output a checksum for each named file, the number of octets in the file and the filename.
cksum uses a portable algorithm based on a 32-bit Cyclic Redundancy Check. This algorithm finds a broader spectrum of errors than the 16-bit algorithms used by sum (see sum(1)). The CRC is the sum of the
following expressions, where x is each byte of the file.
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Raj D.
Honored Contributor

Re: Checksum command ....

Hi Manuales ,

There is no checksum command is there in hp-ux , but cksum is there.


cksum command checks and compare the file , when copied from one place to another place , if the source and target is ok.


The cksum command calculates and prints to standard output a checksum
for each named file, the number of octets in the file and the
filename.

cksum uses a portable algorithm based on a 32-bit Cyclic Redundancy
Check. This algorithm finds a broader spectrum of errors than the
16-bit algorithms used by sum.

Check further with :
# man cksum
# man sum

hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
James R. Ferguson
Acclaimed Contributor

Re: Checksum command ....

Hi (again) Manuales:

It occurs to me that perhaps, too, you have heard of the more "secure checksum" command known as 'md5'. It's available on 11i (11.11 or 11.23):

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=md5checksum

Regards!

...JRF...
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Checksum command ....

It uses a algorithm named CRC ( Cyclic Redundancy Check ).

Rest has already been said above:
Just to check whether the file has changed or got corrupted.
Vibhor Kumar Agarwal
Sivakumar TS
Honored Contributor

Re: Checksum command ....

Dear Manuales,

It is basically to check the intergrity of the file, when coping between servers.

When you take the checksum of the file from the source and destination after copying, you can compare and ensure the intergity.

WIth Regards,

Siva.
Nothing is Impossible !