Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've recently installed Linux, and I know that you can use "md5sum filename" in terminal, but on Windows there is an AMAZING software called HashTab that incorporates it into the shell.

Its awesome, you just right click a file, it gives you the md5, crc32, and sha-1, and it provides a box where you can copy the actual md5 and it compares it for you. I think this program is ingenious, and I hope there is an alternative for linux. Does anyone know of one?

share|improve this question
    
Which desktop environment (or really, which file manager) are you using? –  David Z Nov 14 '09 at 8:36
    
Gnome and nautilus –  GiH Nov 14 '09 at 17:27
    
+1 for explaining what it does, and not assuming everybody will know it. –  user unknown Jun 21 '11 at 22:44

3 Answers 3

up vote 3 down vote accepted

As a former Windows XP user I got used to the Hashtab-tool in the Windows Explorer properties window. In search of an Ubuntu GNU Linux equivalent of this handy Hastab-tool I recently stumbled across a great hastab tool called "GtkHash" for Ubuntu GNU Linux (just search for "GtkHash" in the "Ubuntu Software Center").

Installation of "GtkHash" in Ubuntu 10.10 Maverick Meerkat takes only a few seconds and afterwards the tool can be found under:

  • Applications
    • Accessories
      • GtkHash

GtkHash supports hash functions like:

  • MD5
  • SHA1
  • SHA256
  • SHA512
  • RIPEMD
  • HAVAL
  • TIGER
  • WHIRLPOOL
  • and others.

I personally find "GtkHash" to be the best substitute for the hashtab-tool experience I had back in my Windows XP days for Ubuntu GNU Linux.

Greetings to all linux users worldwide! :)

share|improve this answer
    
thanks, supercheetah's answer was the best solution, but this is much simpler –  GiH Jun 21 '11 at 21:09

I've always liked the handy, script-able md5sum command.
However, there appears to be a Java version called JSummer at Sourceforge.
Maybe, it will work for you.

share|improve this answer

This is the next best thing, I think. Put the following code into $HOME/.gnome2/nautilus-scripts:

#!/bin/sh
# Released into the public domain.
#
for arg
do

md5=$(md5sum "$arg" | awk '{print $1}')
sha1=$(sha1sum "$arg" | awk '{print $1}')
crc32=$(crc32 "$arg")

  gdialog --title "Hashes" --msgbox "File $arg\nmd5   $md5\nsha1  $sha1\ncrc32 $crc32" 800 1100

done

I called the file hashes, but you can call it whatever you want. Make sure to set the execute permission (e.g. chmod +x hashes).

Here's the second part I promised:

#!/bin/sh
# Released into the public domain.
#
for arg
do

md5=$(md5sum "$arg" | awk '{print $1}')
md5compare=$(gdialog --title "MD5 comparison" --inputbox "MD5 hash to compare:" 200 3>&1 1>&2 2>&3)

if [ "$md5compare" = "$md5" ]; then
    gdialog --title "Match" --msgbox "Match confirmed" 200 200
else
    gdialog --title "No match" --msgbox "No match" 200 200
fi

done

This second script I called compare hashes.

EDIT: This is the final version. This one does both the hashes, and comparison with a while loop so that more than one comparison can be done.

#!/bin/sh
# Released into the public domain.
#
for arg
do
    md5=$(md5sum "$arg" | awk '{print $1}')
    sha1=$(sha1sum "$arg" | awk '{print $1}')
    crc32=$(crc32 "$arg")
    compare_msg="MD5 hash to compare:"
    md5compare=$(gdialog --title "Hashes and MD5 comparison" --inputbox "File $arg\nmd5\t\t$md5\nsha1\t\t$sha1\ncrc32\t$crc32\n\n$compare_msg" 1100 3>&1 1>&2 2>&3 )
    while [ $? -eq 0 ]
    do
        if [ "$md5compare" = "$md5" ]; then
            compare_msg="Match confirmed"
        else
            compare_msg="No match\n\t\t$md5compare"
        fi
        md5compare=$(gdialog --title "Hashes and MD5 comparison" --inputbox "File $arg\nmd5\t\t$md5\nsha1\t\t$sha1\ncrc32\t$crc32\n\n$compare_msg" 1100 3>&1 1>&2 2>&3 )
    done
done

This final version I called hash and compare.

EDIT: I just added some formatting niceties.

EDIT: I figured out how to avoid using a temporary file.

share|improve this answer
    
Oh, I guess you also wanted it to compare stuff. Shouldn't be too hard to extend the script, but I'll have to do that later. –  supercheetah Nov 15 '09 at 14:21
    
I just realized that I think I could combine the two into one script. I'll do that in a bit. –  supercheetah Nov 16 '09 at 2:45
    
You're awesome! My only complaint is the interface is very primitive, but you made it work :-) –  GiH Nov 16 '09 at 19:35
    
It would probably look better with zenity, but that's not always installed, and I know that gdialog is available anywhere gnome is installed. –  supercheetah Nov 17 '09 at 2:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.