cksum – compare for multiple files.

If you have to compare cksum for couple of files, the you know how cumbersome it is. So, I wrote a simple script, wherein you can create a file called cksums in the current directory and copy paste the result of  “cksums *”  into this file, and then run this script. Cool 🙂

#!/bin/bash -
#===============================================================================
#
#          FILE: checkcksums.sh
#
#         USAGE: ./checkcksums.sh
#
#   DESCRIPTION: Compare cksums of multiple files.
#
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (),
#  ORGANIZATION:
#       CREATED: 02/22/2013 09:12:17 PM IST
#      REVISION:  ---
#===============================================================================

file=cksums
while read line
do
    a=( $(echo $line) )
    if [[ -f ${a[2]} ]]
    then
        b=( $(cksum ${a[2]}) )
        if [[ $a == $b ]]
        then
            echo "Cksum for ${a[2]} = ${a[0]} matches"
        else
            echo "Failed ::Cksum for ${a[2]} = ${a[0]} matches"
        fi
    else
        echo "Failed :: file ${a[2]} does not exist"
    fi
done < $file
Enhanced by Zemanta

IE8 – Developer Tools

Don’t start banging me for this, but I had to test something on Windows and thus found out this. I f  you need to debug or test something on IE8 on Windows, then you can simply press “F12” and this will bring up the developer tools… could be useful to you, sometime if you are stuck with testing something on IE on windows 🙂

 

Enhanced by Zemanta

slow ssh connection

If you are experiencing slow ssh connections, then possibly your system is trying to do reverse lookup of the IP address. If that is the case, then you can add the below to “hosts” line in /etc/nsswitch.conf file.

‘[NOTFOUND=return]’

The other cause for slow connections can be GSSAPI authentication. If that is the case, then the simplest solution is to add the following in your “~/.ssh/config” file:

GSSAPIAuthentication no

 

Enhanced by Zemanta