jQuery in Action, 2nd edition*
The moose likes Linux / UNIX and the fly likes Use of Checksum command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Use of Checksum command" Watch "Use of Checksum command" New topic
Author

Use of Checksum command

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9351
    
    2

Guys,

What is the purpose of the sum command in Linux? I mean how could the contents of a file that I download differ in my local copy after downloading?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Two reasons I can think of. Sometimes the download fails. I have gotten downloads where they appeared to succeed, but where a sizable portion of the back end of the file is all hex zeros. Doing a checksum will spot such a failed download. Of course, you often find out about this when you attempt to unpack it.

The other possibility is that someone hacked the download link and you end up downloading something other than what you expected. A checksum will help you identify such fraudulent downloads.


JBoss In Action
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

It has more general uses as well. You could run it periodically against your critical config files to detect any adjustments or hacks to your system.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9351
    
    2

Though not fully convincing on the Checksum utility, I feel it to some extent meaningful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use of Checksum command