Adnan Khurshid on January 31st, 2015

Enthusiastic about python? Well, this language has been gaining popularity. Only 2 commands & you will be set to go.

$ yum groupinstall “Development tools”
$ yum install zlibdevel bzip2devel openssldevel ncursesdevel sqlitedevel readlinedevel tkdevel gdbmdevel db4devel libpcapdevel xzdevel
It will take around 3 to 5 minutes & you will be set. Run “Python” to get to the interpreter.
Do you know Google is also enthusiastic about Python? :) Very true as most of the small automation projects they do is based on Python. Below are lectures for those who are interested.

Tags: , , ,

Adnan Khurshid on December 15th, 2014


Having difficulty in connecting to internet from VMware? Recently I installed CentOS in the VMWARE for configuration purposes. I thought it would be beneficial to share how to connect to internet via Linux installed on VMWARE; it can save your time :)

Please note that network can be configured on Linux from the below files.

/etc/sysconfig/network -> Configure HOSTNAME & GATEWAY here.

/etc/sysconfig/network-scripts/ifcfg-eth0 -> Configure IPADDR & NETMASK here

/etc/resolv.conf -> Configure DNS here

However, by default, Network Manger will configure your interface as DHCP. Go to your PC (which is hosting the VMWARE) & check the below connection settings.


That’s it, the network will now be shared with the VMWARE OS. Enjoy! :)

Adnan Khurshid on June 6th, 2011


touch command is used to modify the timestamps of the file. Suppose, you want to modify the time stamp of the file top.txt, use the command as follows:

linux:~ # ls -l top.txt
-rw-r–r–  1 root root 9637 Apr  2 00:20 top.txt
linux:~ #
linux:~ # touch -t 201106062145 top.txt
linux:~ # ls -l top.txt
-rw-r–r–  1 root root 9637 Jun  6  2011 top.txt
linux:~ #

Read the rest of this entry »

Tags: , , ,

Adnan Khurshid on May 30th, 2011


The background processes in Linux refer to the processes running in the background for a particular session which foreground processes are the ones which are currently being operated upon. The commands to manage the processes are as follows:

Show background jobs:

Use ‘bg’ command to display all the processes which are running in the background.

Read the rest of this entry »

Tags: , , , , , ,

Adnan Khurshid on April 5th, 2011


A crontab contains entries for a cron job. Entries in the crontab are separated by newline characters. Each crontab contains six fields separated by spaces as shown below:

Minute Hour Day Month Weekday Command

Each field is explained below:

Minute: 0 ~ 59

Hour: 0 ~ 23

Day: 1 ~ 31

Month: 1 ~ 12

Weekday: 0 ~ 6 (Sunday to Saturday)

Command: A shell file which you want to execute routinely or at a particular time. An example of a crontab job is shown below:

0 1 15 * * /

Read the rest of this entry »

Tags: , , , , , ,

Adnan Khurshid on April 4th, 2011


For large output which is not able to fit in a single window, scrolling the results can skip data while it looks messy as well. to get rid of scrolling, you can use the command “set pause on”. With pause ON, the output will come in small chunks and will continue only when you press enter. It’s output resembles that of a more command which we use in unix.

SQL> set pause on
SQL> select * from SMON_SCN_TIME
  2  ;

———- ———- ——— ———- ———-
         1 1301818161 03-APR-11          0 3498484333
         1 1301818565 03-APR-11          0 3498484683
         1 1301818967 03-APR-11          0 3498485031
         1 1301819370 03-APR-11          0 3498485383
         1 1301819772 03-APR-11          0 3498485730
         1 1301820173 03-APR-11          0 3498486079
         1 1301820574 03-APR-11          0 3498486430
         1 1301820977 03-APR-11          0 3498486780
         1 1301821379 03-APR-11          0 3498487132
         1 1301821785 03-APR-11          0 3498487482
         1 1301822187 03-APR-11          0 3498487851
[waiting for user to press enter]

Read the rest of this entry »

Tags: , ,

Adnan Khurshid on April 4th, 2011


This post will guide you how you can play with SQL using the interactive variable values inside the statement. To begin with, suppose we even don’t know which table we want to query from. To check all the tables inside the logged in database, you can query the TABLE_NAME from user_tables. To get all the columns and the type of values they can store, you can use “desc table_name”.

SQL> desc user_tables
Name                                      Null?    Type
—————————————– ——– —————————-
TABLE_NAME                                NOT NULL VARCHAR2(30)
TABLESPACE_NAME                                    VARCHAR2(30)
CLUSTER_NAME                                       VARCHAR2(30)
IOT_NAME                                           VARCHAR2(30)
PCT_FREE                                           NUMBER
PCT_USED                                           NUMBER
INI_TRANS                                          NUMBER
MAX_TRANS                                          NUMBER
INITIAL_EXTENT                                     NUMBER
NEXT_EXTENT                                        NUMBER
MIN_EXTENTS                                        NUMBER
MAX_EXTENTS                                        NUMBER
PCT_INCREASE                                       NUMBER
FREELISTS                                          NUMBER
FREELIST_GROUPS                                    NUMBER


Read the rest of this entry »

Tags: , ,

Adnan Khurshid on April 4th, 2011


While typing commands on a unix system, removing a miss-typed character by the backspace writes down a character ^H instead. To remove a character, you must use Ctrl+BackSpace instead. However, this exercise is quite frustrating for the users. To get rid of this, use stty erase command as demonstrated below:

root@mms1 # ls -l^H^H^H^H
ls: illegal option —
ls: illegal option —
ls: illegal option —
ls: illegal option —
usage: ls -1RaAdCxmnlogrtucpFbqisfL [files]
root@mms1 #
root@mms1 #
root@mms1 #
root@mms1 #
root@mms1 # stty erase ^H
root@mms1 #
root@mms1 #

With this command, your life would be much easier. You can also get rid of this by using bash instead. For me, its even a better option.

Tags: , ,


This is one of the most commonly observed error in Oracle database. The exact error description is as follows:

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SUN OS Error: 2: No such file or directory

Due to this error, the DBA is unable to login to the SQL prompt. This error is usually caused because of the restricted permission of tnslsnr file in the Oracle DB. While this error is being encountered, the file permissions look as follows:

mms1% ls -l tnslsnr
-rwxr-x–x   1 oracle   dba      2791568 Feb  6  2005 tnslsnr

Read the rest of this entry »

Tags: , , , ,

Adnan Khurshid on March 24th, 2011


I had written an article previously on how to set the environment variables in Linux/Unix system. You may want to have a look it here. Let’s see how we can delete the variables in the SUN Solaris system. The “env” command will display all the variables in the current user.

SUNOS% env

As we can see, there are two DISPLAY variables in the system. Lets first delete both of these variables as shown below:

Read the rest of this entry »

Tags: , , ,