get the contents of whole site like some wiki or wikia

For wikis and wikia, generally if you are trying to get some url mirror, then is an excellent option. This script is in the python sources so, to get this tool,

yumdownloader --source python

Install the rpm downloaded in current directory and then go to ~/rpmbuild/SOUURCES.  You should find a Python-*.tar.xz file here, just extract with

tar xvf Python*.tar.xz

and there you go, you should find the tool in Tools/webchecker/

Enhanced by Zemanta

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:
#         USAGE: ./
#   DESCRIPTION: Compare cksums of multiple files.
#       OPTIONS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (),
#       CREATED: 02/22/2013 09:12:17 PM IST
#      REVISION:  ---

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

viewvc – serve current directory in web interface.

Here is the description of viewvc:

ViewVC is a browser interface for CVS and Subversion version control
repositories. It generates templatized HTML to present navigable directory,
revision, and change log listings. It can display specific versions of files
as well as diffs between those versions. Basically, ViewVC provides the bulk
of the report-like functionality you expect out of your version control tool,
but much more prettily than the average textual command-line program output.

and to install, just execute:

sudo yum install viewvc

And when you want to serve the current directory in the web browser, you just need to execute the following command in that directory:

/usr/lib/python2.7/site-packages/viewvc/bin/ -r $PWD


Enhanced by Zemanta