Resize Multiple Images

Submitted by abhishek on Sat, 02/22/2014 - 10:25

I am sure you would have come to a situation when you would have to resize multiple images say you copied 200 images from your Digital Camera and now need to upload them and need to resize them all, now doing this using GIMP would take ages here is a easy way.

Step 1) Install ImageMagick

sudo apt-get install imagemagick

Step 2) Change to the Directory where all Images are Present

Step 3)

a) If you need to reduce images to a specific Percentage

mogrify -resize 20% -format jpg *

b) If you need to reduce to Specific Width & Height

mogrify -resize 800x600 -format jpg *

c) If you need to reduce to Specific Width

mogrify -resize 1024x -format jpg *

Further Reading Click Here !!!

Restore GRUB 2

Submitted by abhishek on Tue, 08/24/2010 - 19:11

In most of the systems GRUB is now upgraded to 2.0 and with this update the old restore process have also changed now there is no grub command :) available.

If you have lost the Bootloader after a routine reinstall or due to any other reason try the following to restore

Boot Using a Live CD and try the following as root

grub-setup -d /media/XXXXX/boot/grub -m /media/YYYYY/boot/grub/ /dev/sda

Where XXXXX represents the root partition and YYYYY represents the partition holding the /boot in case you dont have a seperate partition for /boot then XXXX and YYYY would be be the same. /dev/sda may change depending on the system you are using.

Please note this would erase the current bootloader and install a new one for you if you are unsure of what you are doing do not try this

Where .deb files are stored in Ubuntu ?

Submitted by abhishek on Fri, 10/02/2009 - 18:09

We always hear people saying ubuntu works well only when you have a strong internet connection as the Install CD doesn't contain all the packages required agreed now a CD cannot contain all the packages you require so you need to download the packages but there is a clear misunderstanding among new users that they always need to download these packages, Its essential to download them once but if you are reinstalling ubuntu on new machine you need not download these packages all over again if you have installed required packages on one of the machine you can use the content of below listed directory for installation


this directory contains the debian packages download by the apt-get :)

so have fun reuse the content for each install and save time and bandwidth

Hosting a Website from Local Machine

Submitted by abhishek on Sat, 08/29/2009 - 23:20

I am sure you would have thought atleast once of hosting your website from your machine itself, if not the website atleast a sandbox version of it as it would be comparatively easy for you to maintain it so i discuss the steps you need to follow to achieve this, first lets go through the requirements, in this post i am talking about small sized sites a minor modified version of this post is applicable for large sites as well.


1) A really broad Internet Connection.
2) A Static IP
3) A High End Machine (if the site you are hosting is pretty static a lower end machine is sufficient to be more clear a dynamic personal blog kind of site will also never need more than 1000 Mb of RAM unless you are the Top blogger of the country)
4) Server Software (Apache preferred)
5) A Database Server (if needed, mysql/postgresql recommended)
6) Scripting Support (might be PHP. perl, python as per the requirements)

Key Based Authorization with SSH

Submitted by abhishek on Wed, 08/26/2009 - 19:09

Using remote shells is all time favourite but remembering those many passwords is a pain so here are the steps to login using SSH without putting a password :)


1. Create a public ssh key, if you haven’t one already. Look at ~/.ssh. If you see a file named then you obviously already have a public key. If not, simply create one.

ssh-keygen -t dsa should do the trick. Please note that there are other types of keys, e.g. RSA instead of DSA.

2. Make sure your .ssh dir is not publically writable

    # chmod 700 ~/.ssh

Configuring Apache with SSL

Submitted by abhishek on Fri, 06/12/2009 - 14:47

Apache is the most common web server used now a days, you would have already configured apache many times by now but what about configuring it with SSL i.e. using apache to service on the https protocol, i assume you have already configured the basic apache server and have also enabled the SSL module, if not refer to my previous post on Configuring Apache Web server.

The following post is an extremely simplified step by step guide to configure SSL in apache using Self Signed Certificates you can also use a real certificate issued by a CA if you have it


1) Apache with SSL module enabled
2) openssl installed

Step 1) Generate a Private Key

We will use the openssl toolkit for generating a RSA Private Key and Certificate Signing Request, as the first step generate the key the command below will create a 1024bit key using 3des

Configuring BSNL EVDO Modem in Debian GNU/Linux

Submitted by abhishek on Thu, 04/30/2009 - 23:16

EVDO DeviceI recently shifted to Debian GNU/Linux (Lenny), and the first task included configuring my Internet Connection, i use BSNL EVDO Modem to connect to the internet which is not recognized my default in Debian so following is the process by which i configured my BSNL EVDO in Debian

Step 1) Checked for Modem, Vendor and Product ID

$ cat /proc/bus/usb/devices

You will find many entires in this just check for your modem entry in my case i found

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=fffe Rev= 0.00
S:  Manufacturer=ZTE, Incorporated
S:  Product=ZTE CDMA Tech

by this i know the following information

Tuz the new mascot for Linux

Submitted by abhishek on Wed, 04/15/2009 - 19:48

Tux the Linux mascot will take a break for a while with the release of Kernel 2.6.29 Tuz would be replacing Tux.

Tuz mascot for 2.6.29

Tuz is a Tasmanian Devil, which is a species in danger of becoming extinct. The Tasmanian Devil is native to Australia and during this year's Linux.Conf.Au conference it was decided that Tuz will stand in for Tux for one kernel release in order to raise awareness for this creature. Tux will return with the release of the Linux 2.6.30 kernel :).


Whats in your MBR ??

Submitted by abhishek on Wed, 04/15/2009 - 17:39

Master Boot Record or the MBR max to 512 Kb but very essential have you ever looked at what your MBR contains most probably NO!!, so try out the following 2 commands as root and check your MBR Contents

# dd if=/dev/hda of=mbr.bin bs=512 count=1
# od -xa mbr.bin

This will display your MBR change hda to sda if u have an sda type disk, following is my MBR you might not understand anything from this but a careful look is required to know what is it :)

0000000 48eb d090 bc66 7c00 0000 c08e d88e e689
k H dle P f < nul | nul nul so @ so X ht f
0000020 bf66 0600 0000 b966 0100 0000 a5f3 23ea
f ? nul ack nul nul f 9 nul soh nul nul s % j #
0000040 0006 8000 80fa 057c fa80 7e87 b202 8880
ack nul nul nul z nul | enq nul z bel ~ stx 2 nul bs
0000060 4916 6607 bebf 0007 3100 66f6 04b9 0203
syn I bel f ? > bel nul nul 1 v f 9 eot etx stx
0000100 00ff 2000 0001 0000 0200 90fa f690 80c2