Charm is a charismatic thing that strikes the sight & leaves it impression in heart. That’s why first impression is the last impression. Use the following laws to make your personality more & more charming. As follows,

Law: 1 – Control Your Moods: – Make a habit of breaking bad moods. Always try to be nice with peoples. Just being nice to the people only when you want i.e. as per your mood makes the difference, so it is better to control your moods.
Law: 2 – Offer understanding, Empathy & help.
Law: 3 – Don’t desire to be center of attraction, Create your own influence.
Law: 4 – Avoid Fault finding, Spend time to analyze yourself.
Law: 5 -Give Encouragement & Appreciation.
Law: 6 – Avoid desiring to be considered as superior.
Law: 7 – Show Interest.
Law: 8 – Be Co-operative, helpful & Generous.
Law: 9 – Be pleasant & look cheerful.
Law: 10 – Be enthusiastic & energetic.
Law: 11 – Spread Genuine love & being loved.
Law: 12 – Look pleased to see peoples, while speaking be proactive.
Law: 13 – Be Nice to the people.
Law: 14 – Avoid talking back of the peoples.

Just 14 laws is not the standard set, it is the basic primer for personality. You can create your own laws; you will be able to create your own 14000 laws as you keep on analyzing yourself, learning yourself, analyzing your real self. The more we study our-self; we will come to know more about our-self. There is no excellent book that will help you to be charming, but, yes, there is a one perfect book which will help you & guide you to be charming and that is your own MIND.

By – Mr. Nilesh Gore. For More Details Visit at http://www.braindynamic.com

Just being in a profession does not make one a professional. Read on to know what goes into making one.

The magic question that made everyone put on their thinking cap was, “what is professionalism”?

The answers varied from individual to individual but there seemed to be a general lack of succinct understanding of the concept.

To start with let’s agree on something — just because one is a professional, he or she automatically does not exhibit professionalism.

A very general, raw idea of professionalism is, it includes everything i.e. from the bed tea to the switch off of the light and it is a bundle of the following concepts:

  • A focused approach
  • Pride in what one is doing
  • Confident
  • Competent
  • Motivation towards a particular goal
  • Accountability
  • Respect for people irrespective of rank, status and gender
  • Responsibility while on the path to a particular goal
  • Commitment to word and deed
  • Control of emotions

Well, you are beginning to get the idea now. Basically it all boils down to where you leave out emotional upheavals and stay focused on the issue no matter what the issue is or how stressful and trying a situation turns out to be.

To know more visit for my next post I will continue with this topic.

Thank U to all my loyal readers. Do share your opinions, viewpoints and comments. Many thanks.

If there is not already a password command in the GRUB configuration file then create a hashed password. The password should be good, as it can be used to gain root access.

Step: 1 login as root and execute ‘grub’ command in terminal/konsole. prompt will change to ‘grub>’ execute md5crypt to generate password hash.

grub> md5crypt

It will prompt you for password, enter the password which you are going to set for GRUB.
It will display encrypted password hash.

Password: ******
Encrypted: $1$jxcdN0$hVHViq1aiPf8FziuGJGZp0

Step: 2 Note down encrypted password hash and exit grub mode

grub> quit

Step:3 edit /boot/grub/grub.conf file and insert encrypted password in between “splashimage” and “title” lines.

splashimage=(hd0,0)/boot/grub/splash.xpm.gz
password --md5 <password-hash>
title Fedora Core 6

Q.: How can I remove/uninstall a package from my Linux machine completely. I want to remove all the reference and settings created by the softawre also.

Please help ASAP

Ans: Code (more…)

Step: 1 Download Linux kernel Source Code

Visit http://kernel.org/ and download the latest source code. The latest kernel is linux-2.6.29.4.tar.bz2 (As Dt. May 28, 2009)

Step: 2 Extract .tar.bz2 file

Type the following command:

# tar -xjvf linux-2.6.29.4.tar.bz2

After the above command you will get one folder named as linux-2.6.29.4

# mv linux-2.6.29.4 /usr/src

Step: 3 Configure kernel

Now start the kernel configuration by typing the following command:

  • $make oldconfig – Create a file named as .config

Again type any one of the following command:

  • $ make menuconfig -
         Text based color menus, radiolists & dialogs. This option also useful
         on remote server if you wanna compile kernel remotely.
  • $ make xconfig - X
         windows (Qt) based configuration tool, works best under KDE desktop
  • $ make gconfig - X
         windows (Gtk) based configuration tool, works best under Gnome Dekstop.

This command will create a file named as .config.old

To know the difference between the present kernel and previous kernel type the following command.

$diff .config .config.old

Step: 4 Compile kernel

Start compiling to create a compressed kernel image.

$ make –j8

Start compiling to kernel modules:

$ make modules 

Install kernel modules (become a root user, use su command):

$ su - 

# make modules_install

Step: 5 Install kernel

We have compiled kernel and installed kernel modules. Now it is the time to install the kernel.

# make install 

It will install three files into /boot directory as well as modification to your kernel grub configuration file:

  • System.map-2.6.25
  • config-2.6.25
  • vmlinuz-2.6.25

Step: 8 Reboot computer and boot into your new kernel

Just issue reboot command:

# reboot

At the time of booting press any key to go the option menu of kernel to boot.

Following is from http://www.rediff.com/news/2004/may/20spec4.htm

Dr Manmohan Singh, who will be sworn in as prime minister this weekend, is the most highly qualified occupant of the prime minister’s office.

How do his predecessors compare with him?

Dr Manmohan Singh

MA, D Phil (Oxford). Educated at the Universities of Panjab, Cambridge and Oxford. Winner of the University Medal for standing first in BA (Hons), Economics, Panjab University, Chandigarh, 1952; the Uttar Chand Kapur Medal, Panjab University, Chandigarh, for standing first in MA (Economics) 1954; Wright’s Prize for distinguished performance at St John’s College, Cambridge, 1956 and 1957; Adam Smith Prize, University of Cambridge 1956.

Atal Bihari Vajpayee

20atalEducated at Victoria (now Laxmi Bai) College, Gwalior, and DAV College, Kanpur. Vajpayee holds an MA in political science.

Inder Kumar Gujral

I.K Gujral

MA, BCom.

H D Deve Gowda

H.D Gowda

Diploma in civil engineering.

PVN Rao

PVN Rao

B Sc, LLB, Sahitya Ratna. Educated at Fergusson College, Pune, and Nagpur University.

Chandra Shekhar

Chandra Shekhar

MA in Political Science from Allahabad University.

V P Singh

V P Singh

Educated at Allahabad and Poona University.

Rajiv Gandhi

Went to Trinity College, Cambridge, but soon shifted to the Imperial College in London. He did a course in mechanical engineering. Short stint at the London School of Economics.

Charan Singh

Charan Singh

Science graduate, 1923, and post-graduate from Agra University in 1925. Also trained in law.

Morarji Desai

Morarji Desai

Graduate from Wilson College in the then Bombay province in 1918.

Indira Gandhi

Indira Gandhi

Studied at Ecole Nouvelle, Bex (Switzerland), Ecole Internationale, Geneva, Pupils’ Own School, Poona and Bombay, Badminton School, Bristol, Vishwa Bharati, Shantiniketan and Somerville College, Oxford. No documented degree. Honorary doctorates from a host of Indian and foreign universities.

Lal Bahadur Shastri

Lal Bahadur Shastri

Gave up studies at 16 to respond to Mahatma Gandhi’s call for satyagraha. Bachelor’s degree (Shastri) from Kashi Vidyapeeth in Varanasi.

Gulzarilal Nanda

Gulzarilal Nanda

Twice caretaker prime minister (May 27 to June 9, 1964 and January 11 to 24, 1966). Educated at Lahore, Agra and Allahabad. Research scholar on labour problems at the University of Allahabad. Professor of Economics at National College in Bombay province.

Jawaharlal Nehru

Jawaharlal Nehru

Went to Harrow, the famous public school in England. at 15. Then went to Cambridge for his tripos (a degree course at Cambridge is called a tripos after the three-legged stool on which the student traditionally sits to give his oral exam) in natural sciences. Called to the Bar from Inner Temple.

Creating, Mounting, and Configuration New Partitions

Before adding an extra drive, this machine had 2 physical drives. Both of them were named accordingly (sda and sdb) before the new drive was added. The second drive containing the swap partitions was automatically renamed when the new drive was added. Notice the command and output below:


[root@roswell root]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             8.3G  2.4G  5.5G  30% /
/dev/sda2              99M   26M   69M  27% /boot
/dev/sdc1              16G   13G  2.3G  85% /export  <-- old sdb renamed to sdc by the Linux
none                  250M     0  250M   0% /dev/shm
[root@roswell root]#

This command simply lists all currently mounted drives, their names, and space usage. Notice that sdb is not presently mounted. However, we know that it exists otherwise, there would not be an sdc present. I could not add my new drive as sdc because my SCSI hotswap drive cage reserves the first two slots for 1.5″ drives. So I was forced to make the new drive sdb because it is a 1.5″ drive.

Setting Partitions

You should be fairly familiar with fdisk. The commands are somewhat different than it’s DOS equivalent. See the following commands and output:


[root@roswell root]# fdisk /dev/sdb

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): 

If there is a problem, and there is no drive associated with /dev/sdb, you will get an error message. Remember, that nothing will actually be executed until you issue a w command. It’s always a good idea to read through the variables of your commands. Doing so will ensure that you aren’t forgetting anything. Let’s get started!


Command (m for help): p

Disk /dev/sdb: 50.0 GB, 50019202560 bytes
255 heads, 63 sectors/track, 6081 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System

Command (m for help):

If you issue a p command, you will see any partitions that currently exist on the drive. You can see by the output above there are no existing partitions. This drive is un-partitionedd and unformatted. To create a new partition, is the n command.


Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-6081, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-6081, default 6081): 6081

Command (m for help):

In the output above notice that interval I selected for the cylinders. Using the entire range allows you create one partition across the entire drive. So, in order to create a primary partition on /dev/sdb/ we issued the following commands:

  • n
  • (creates a new partition)

  • p
  • (creates a primary partition)

  • 1
  • (the number 1 denotes the partition will be /dev/sdb1)

We can check the partition specifications we just entered by using the p command again.


Command (m for help): p

Disk /dev/sdb: 50.0 GB, 50019202560 bytes
255 heads, 63 sectors/track, 6081 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1             1      6081  48845601   83  Linux

Command (m for help): 

Notice the new partition (highlighted in red). However, we must issue a w command to finalize it. If you messed anything up, you can use the d command and specify which partition you want to delete.


Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@roswell root]#

Formatting

Now that the partition has been created, you need to format the drive. You can format it with almost any file system you wish. However, the most common Linux formats are ext2 and ext3. Ext3 is simply a candy coated version of ext2 that adds a logging feature. You must specify which partition to format by calling the device and partition number like this:


[root@roswell root]# mkfs -t ext3 /dev/sdb1
mke2fs 1.32 (09-Nov-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
6111232 inodes, 12211400 blocks
610570 blocks (5.00%) reserved for the super user
First data block=0
373 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@roswell root]# 

What did we do there? Using the mkfs (make file system) command, we specified the type (using the -t) ext3 using the device and partition name (/dev/sdb1). You have successfull partitioned and formatted your new drive. Wait, you’re not done yet. You will want to mount this partition to make it usable. You will also want this partition to mount automatically when you reboot the machine.

Mounting

In order to automatically mount a partition, you must edit the /etc/fstab file. The fstab file tells Linux where to mount all partitions located within the system. The output below shows the current fstab file before including the newly added drive:


[root@roswell root]# vi /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
LABEL=/export           /export                 ext3    defaults        1 2
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/sdb2               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0

You may notice I viewed this file using vi. Vi is a simple text editor that may or may not be loaded on your Linux system. It is somewhat similar to emacs. In any case, both programs can perform the same task. We will mount the new partition as /media. Remember to create a directory named media, otherwise fstab won’t be able to mount the partition. It is shown high-lighted red in the output below:


LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
LABEL=/export           /export                 ext3    defaults        1 2
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/sdb1               /media                  ext3    defaults        1 2
/dev/sdb2               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0

Next, issue a simple mount command providing the partition name:


[root@roswell export]# mount /dev/sdb1
[root@roswell export]#

You’re all done! You will be able to access the /media folder immediately and after the machine reboots as fstab will automatically re-mount it for you. If you want to verify the partition is successfully present and mounted, use the following commands:


[root@roswell media]# mount
/dev/sda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/sda2 on /boot type ext3 (rw)
/dev/sdc1 on /export type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sdb1 on /media type ext3 (rw)
[root@roswell media]#

The red line shows our new drive freshly mounted. You can check the space usage if you issue the following command.


[root@roswell media]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             8.3G  2.4G  5.5G  30% /
/dev/sda2              99M   26M   69M  27% /boot
/dev/sdc1              16G   13G  2.3G  85% /export
none                  250M     0  250M   0% /dev/shm
/dev/sdb1              46G   33M   44G   1% /media
[root@roswell media]#

Read Interrupt Mask (RIM)

  • RIM is a multipurpose instruction used to read the status of interrupts 7.5, 6.5, 5.5 and to read serial input data bit.
  • RIM loads 8-bit data in the accumulator with the following interpretation. Actually RIM does the following three tasks:
  1. Read the interrupt mask (bit 2, 1, 0)
  2. Identify pending interrupts (bit 6, 5, 4)
  3. Receive serial input data bit (bit 7)

Set Interrupt Mask (SIM)

  • SIM is a multipurpose interrupt used to implement the 8085 interrupts (RST 7.5, 6.5, 5.5) and serial data output.
  • SIM interprets the accumulator content as follows. Actually, SIM does the following three tasks.
  1. Mask the interrupts (bit 2, 1, 0)
  2. Reset RST 7.5 (bit 4). This is mainly used to overwrite RST 7.5 without serving it.
  3. To implement serial I/O (bit 7, 6). If bit 6 = 1 is used to enable serial I/O and bit 7 is used to transmit serial output data bit.

Input Data to Accumulator from a Port with 8-bit Address The contents of the input port designated in the operand are read and loaded into the accumulator. The operand is an 8-bit address. During execution, this port address is duplicated in the lower order and higher order address buses. Any one of the sets of address lines can be decoded to enable the input port.

System Life Cycle:

  • Booting.
  • Kernel Initialization
  • Device Initialization.
  • Run.
  • Shutdown.

To boot a computer is to start the computer.

A boot sequence, also called a boot process, boot routine or bootstrap routine, is the set of operations a computer begins performing when the electric power is switched on and continues until it is ready to use. The main thing that occurs is the copying the operating system from a storage device, typically the hard disk drive (HDD), into main memory (which is composed of random access memory chips, or RAM) so that it can be directly accessed by the central processing unit (CPU).

The bootstrap process is highly dependent on the computer architecture.

  • When a PC is booted it starts running BIOS program.
  • LILO is the program that Linux systems typically use to give users a choice of operating systems to run.

BIOS (Basic Input Output System):

  • BIOS is a small program that controls computer’s hardware from the time the computer is started until the main operating system takes over.
  • When the computer is turned on, the BIOS is the first program which will be loaded into the memory and then conducts a basic hardware check, called a power on self test (POST), to determine whether all of the hardware devices are present and functioning as usual or not.
  • BIOS then load the operating system into the computer’s main memory (RAM).
  • After the booting procedure ends the BIOS acts as an interface between the CPU and computer hardware.
  • Though BIOS is working as the interface, no need for the operating system and application programs to be aware of the details of the hardware.
  • When device details change, only the BIOS needs to be updated.
  • After the boot procedure ends BIOS passes execution to machine code instructions contained within the MBR.
  • BIOS is stored in a flash memory chip, present in the motherboard.
  • BIOS cannot be stored on a HDD or other device because it manages those devices or hardware.
  • Before the year 1990, BIOSs were stored in ROM chips, whose contents could not be modified.

LILO (Linux Loader):

  • LILO is a program.
  • When computer starts BIOS loads LILO into the memory.
  • It provides the user to choice the OS to boot first.
  • LILO also has a timeout period for the user.
  • If the user does not do anything before the timeout occurs, LILO will run the default operating system selected when it was installed.
  • LILO knows how to locate the kernel image, where to load the kernel into memory, and how to start the kernel.
  • LILO is installed as part of the typical Linux installation procedure.
  • LILO is the most used Linux Loader for the x86 flavor of Linux.
  • LILO resides in the first sector of the disk or called boot sector.
  • A boot sector is a region of a HDD, floppy disk or other storage device (usually the first sector) that is loaded into memory and executed as a part of the boot sequence.

Note:

  • The Linux kernel is installed compressed, containing a small program to de-compress itself, and it will uncompress itself.
  • Linux does not use BIOS; it provides its own device driver for every hardware device on the computer.
  • But Linux is forced to use BIOS at the time of booting or when it retrieves the kernel image from the disk or from some other external devices.

MBR (Master Boot Recorder):

  • A master boot record, or partition sector, is the 512-byte boot sector that is the first sector (“LBA Sector 0″) of a partitioned data storage device such as a hard disk.
  • The boot sector of a non-partitioned device is a Volume Boot Record.
  • These are usually different, although it is possible to create a record that acts as both; it is called a Multi Boot Record.
  • It has two functions:

o It holds the partition table of a disk.

o It contains the executable code that the BIOS run when the computer first starts up.

Structure of 512 bytes of MBR:

Size (Bytes)

Description

446 bytes

Executable code section

4 bytes

Optional disk signature

2 bytes

Usually NULL

64 bytes

Partition Table

2 bytes

MBR Signature

GRUB (Grand Unified Boot loader):

  • GRUB is a boot loader.
  • It is the greatest loader for booting Linux and any other Operating System.
  • The purpose of the GRUB kernel is to recognize filesystems and load boot images into the memory.
  • It provides both menu-driven and command-line interfaces to perform these functions.

Linux organizes its files differently from Windows. In Linux, all filesystems are contained within one directory hierarchy. The root directory is the top level directory, and all its subdirectories make up the directory hierarchy. This differs to other operating systems such as MS-Windows which applies a separate hierarchy for each device and partition.

Top Level Directory

“/” or root

Subdirectories

bin, sbin, lib, usr var, boot, dev, etc, home, mnt, proc, root, tmp, lost+found, opt.

The above directories we can find in the filesystem. Type the below command in the terminal and you can find all the subdirectories of root filesystem.

$ls /

What is inside?

/bin

Contains executable programs such as ls and cp. These programs are designed to make the system usable. Programs within /bin are required for system repairing. Some of the files located in the /bin directory include:

Shell programs

  • bash, * sh

File manipulation programs

  • tar, * echo, * vi, * grep

Process handling programs

  • kill, * ps

/boot

Stored in this directory are files that are required for the Linux boot process. Such files include vmlinuz, the Linux kernel file.

/dev

Contains device files required for interfacing with hardware. Devices in Linux are either block or character devices. Examples of character devices are your keyboard, mouse and serial port. Block devices can include the floppy drive, CD-ROM drive and hard disk. Common files in /dev include:

  • psaux (interface to PS/2 mouse)
  • modem (interface to modem hardware)
  • ttyS0 (first serial port)
  • tty0 (first virtual console).

/etc

Contain configuration files which are local to the machine. Programs store configuration files in this directory and these files are referenced when programs are run. Common files or directories found in /etc include:

  • /etc/X11/ (the X Window configuration directory)
  • profile (system-wide environment configuration file).

/home

Contains user account directories. Each user created by the system administrator will have a subdirectory under /home with the name of the account. This is the default behaviour of Linux systems. E.g. User account for Anna is created, her home directory will be located in /home/lakshya. All her personal files will reside in this directory. All participants in this class are using the home directories of their respective user accounts. At Computerbank, /home is served via the network, enabling users to access their home directory from any networked machine.

/lib

Contains shared object library files that are necessary to boot the system as well as containing files required by various programs such as rm and ls. This directory also contains modules (located in /lib/modules) which can be loaded into the kernel. Files of interest in /lib include:

  • libm.so (shared object file used for math functions)
  • libc.so (C programming library used for all system and library calls).

Module files are located in /lib/modules/`uname -r`/kernel/

/mnt

Used for mounting temporary filesystems. When mounting a CD-ROM for instance, the standard mount point location is /mnt/cdrom. On the Debian GNU/Linux systems at Computerbank, the mount point has been changed to /cdrom.

/lost+found

When the filesystem cannot properly identify files, the respective files are placed in this directory. If data appears to have been lost mysteriously, it is a good idea to check in this direetory (or ask your system administrator to check for you).

/opt

Used for storing random data that has no other logical destination.

/proc

Provides information about running processes and the kernel. A directory is provided for each running process. Useful system information such as the amount of Random Access Memory (RAM) available on the system as well as Central Processing Unit (CPU) speed in Megahertz (MHz) can be found within the /proc directory. The following commands will give you this information:

$ cat /proc/cpuinfo - Display CPU information of system
$ cat /proc/meminfo - Display RAM information as well as swap space capacity and usage.

/root

This is the home directory for the super user (root). This directory is not viewable from user accounts. The /root directory usually contains system administration files.

/sbin

Similar to /bin, this directory contains executable programs needed to boot the system, however the programs within /sbin are executed by the root user. Contains system maintenance programs, examples of which are:

  • ifconfig (interface configuration, use this command to add or remove a network interface)
  • mkfs (make a filesystem on a partition)
  • lilo (boot loader software, tells your Master Boot Record (MBR) where to find your operating system(s). Linux Loader (LILO) stores its working files in /boot.

/tmp

This directory is used for temporary storage space. Files within this directory are often cleaned out either at boot time or by a regular job process. The Debian GNU/Linux operating system cleans up the /tmp directory at boot time. An example for using the /tmp directory in Computerbank would be when downloading the OpenOffice deb packages. By downloading these packages into the /tmp directory, the user can be assured the packages will be wiped off the system next time the machine reboots.

/usr

Used to store applications. When installing an application on a Debian GNU/Linux machine, the typical path to install would be /usr/local. You will notice the directory structure within /usr appears similar to the root directory structure. Some directories located within /usr include:

  • /usr/doc – Documentation relating to the installed software programs.
  • /usr/bin – Executable programs that are not required for booting or repairing the system.
  • /usr/local/src – Source code for locally installed applications.

/var

This directory contains files of variable file storage. Files in /var are dynamic and are constantly being written to or changed. Some directories located within /var include: /var/spool – files in the print queue * /var/log – files containing logging information * /var/run – files containing the process ID’s for each current process.

Shell accepts the command from the keyboard and executes them. But if you want to execute sequence of n number of command then store that sequence of command to a text file and tell the shell to execute this text file instead of entering the commands. This is known as shell script.

Shell script defined as:

Shell Script is series of command written in plain text file. Shell script is just like batch file is MS-DOS but have more power than the MS-DOS batch file.

What if we want to run two commands over and over again then one way of doing it would be like this

$ls;pwd

* Command separated with a semi colon.

Why to write Shell Script?

  • Shell script can take input from user, file and output them on the screen.
  • Useful to create our own commands.
  • Save lots of time.
  • To automate some task of day today life.
  • System Administration part can be also automated.

In Linux there are two types of variables

  • System Variables
    • Created and modified by Linux itself. This type of variables defined in CAPITAL LETTERS.
  • User Defined Variables (UDV)
    • Created and maintained by user. This type of variable defined in lower LETTERS.

Some System Variables

System Variable

Meaning

BASH=/bin/bash Shell Name
HOME=/home/lakshya Home Directory
PWD=/home/lakshya/google Current Working Directory
PATH=/usr/bin:/sbin:/usr/sbin Path Setting
SHELL=/bin/bash Shell Name
LOGNAME=lakshya Logging Name
USER=lakshya Logging Name

To see the system variables type the following command

$echo $BASH
$echo $HOME

N.B: Don’t modify system variables this can create problems.

How to defined User Defined Variables

To defined UDV use following syntax

$variable=value

e.g

$BBSR=Bhubaneswar

To see that value of the variable (BBSR) type the following command

$echo $BBSR

It will print the value Bhubaneswar.

How to write Shell Script

Following Steps are required to write Shell Script

  1. Use any editor like vi to write Shell script
  2. After write After writing shell script set execute permission for your script as follows
  3. Execute your script

Example:

Step 1: Write Shell Script

$vi test

#
#
#My first Shell Program
#
#
echo "Welcome to Lakshya"
echo "The Missing Link Between You and Your Success"

Save that Shell script file

Step 2: Set execute permission to the file

$chmod 755 test

Step 3: Execute the file

$./test

OUTPUT:

Welcome to Lakshya
The Missing Link Between You and Your Success

If you want execute without giving ./test then it is possible.

Create a bin directory in your home directory

$mkdir bin

Then copy your tested version of Shell script to that bin directory. After this you can run your shell script as executable file without using $ ./test

Example:

Write a shell script to print current date, login name and calendar

$ vi log
 #
 #
 # Script to print user info who currently login,current date & time
 #
clear
 echo "Hello $USER"
 echo "Today is \c ";date
 echo "Number of user login : \c" ; who | wc -l
 echo "Calendar"
 cal

Save that file then change permission and then execute the file.

How to print or access value of UDV

Step 1: Create file

$ vi udv

#
# Script to print or access value of UDV
#
myorg=Lakshya
add= IDCOTOWER
street=4thFloor
 city=Bhubaneswar
 echo "Organization :$myorg"
 echo "Address : $add"
 echo "$street"
echo "$city"

Save and exit

Step 2: Change file permission

$chmod 755 udv

Step 3: execute the file

$./udv

OUTPUT:

Organization: Lakshya
Address: IDCO TOWER
 4thfloor
 Bhubaneswar
  1. Linux doesn’t have the virus problems. Its not that there aren’t any viruses for Linux but Linux is more secure and less virus prone.
  2. Linux doesn’t need defragging. The Linux file systems work very efficiently such that it arranges data in a way that it doesn’t require defragging.
  3. Linux doesn’t crash without any apparent reasons. In Linux the core operating system (kernel) is separate from the GUl (X-Window) from the applications (OpenOffice.org, etc). So even if the application crashes, the core operating system is not affected.
  4. Linux doesn’t require frequent rebooting. Linux runs extremely stable, even if an application crashes, there is no need to reboot the whole system, just restart that application or service.
  5. No licensing headaches. Yes Linux is free and you don’t know need to bother about the complex licensing of per user/per PC/per server/etc.
  6. Linux can read over a 100 different types of file systems. Windows is limited to its own two file systems. Well most general users may not care about this but its extremely useful is you are working in a mixed environment or you need to extract some data from a hard drive formatted on another computer.
  7. You have the source code and the right to modify or fix things if you are a programmer.
  8. You can also share the software with your friends and its completely legal to do so.
  9. The Linux kernel comes shipped with an enormous load of hardware drivers. On Windows, a lot of hardware doesn’t work until you install the driver.
  10. Linux is the most documented operating systems and most of these documentations are available for free.

My dear loyal readers the list goes on, I will also continue to my next post. Thank You all.

From : Admin

Sometimes people face the problem to delete a user in GUI mode. At that time you may need the help of command. Here I can help you to delete the user in command. Just follow the following steps. To delete a user you needs to be super user authorization
First go to the super user mode

    $su
    Password:

Then follow the steps:
First verify that user is present in your file system or not.
To verify the command is

    #finger <username>
    #finger lakshya

Then to delete the user type the following command

    #userdel -r lakshya

If you will type the above command it will display command not found.
If your question is why then just type the following command

    #whereis userdel
   //It will display where your userdel command is present.
   //It will display like this
    userdel: /usr/sbin/userdel /usr/share/man/man8/userdel.8.gz

Then type the userdel command with the path

    #/usr/sbin/userdel -r lakshya

For confirmation just type again the finger command

    #finger lakshya
    finger: lakshya: no such user.

Thank you all my loyal readers. Keep posting your view points, comments, wish.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Test
{
    public static void main(String args[])
    {
        String lsString = null;
        Process process = null;
        try
        {
            process = Runtime.getRuntime().exec(”ls”);
            BufferedReader bufferedReader = new
            BufferedReader(new InputStreamReader(process.getInputStream()));
            while ((lsString = bufferedReader.readLine()) != null)
            {
                System.out.println(lsString);
            }
            try
            {
                process.waitFor();
            }
            catch (InterruptedException e)
            {
                e.printStackTrace();
            }
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
    }
} // end test.java

1. I love the way we finish each other’s sentences.

2. I love the way I know you’ll never give up on me.

3. I love the fact that I wouldn’t ever give up on you.

4. I love the way you look at me.

5. I love how beautiful your eyes are.

6. I love the way I can’t imagine a day without you in my life.

7. I love the way if we were ever separated I wouldn’t know how to go on.

8. I love the way we cuddle and watch sunsets together.

9. I love the way we sometimes stay up all night and just talk, then watch the sunrise together.

10. I love how I know you’ll always be there when I need you to be.

11. I love the fact that I will always be there for you too.

12. I love how when I dream of my life partner, the only person that I can see is you.

13. I love how complete I feel when I am with you.

14. I love how our bodies just fit together.

15. I love the way you make me laugh.

16. I love the way you laugh.

17. I love the way you won’t compromise yourself when we are together.

18. I love the way you won’t let me compromise myself.

19. I love your thoughtfulness.

20. I love your tenderness.

21. I love your ability to speak without saying a single word.

22. I love the way we glance at each other across the room and know what each other is thinking.

23. I love the way, how even though we may be miles apart I still feel like you’re right here with me.

24. I love the way you surprise me with the perfect gifts that show you pay attention to me.

25. I love the way you’ll watch a sporting game with me even though you may not be interested in it.

26. I love the way you treat my friends.

27. I love your love for the things that interest me.

28. I love the way you let me live my life freely without jealousy.

29. I love how you demand respect but are not controlling.

30. I love how I would do anything in this world to make you happy.

31. I love how you would do anything in this world to make me happy.

32. I love the way your voice sounds over the phone.

33. I love the way your voice sounds when you whisper sweet nothings in my ear.

34. I love the completeness and oneness I feel when we make love.

35. I love your sensuality.

36. I love how our romance feels like the perfect romance movie.

37. I love how you are my soul mate.

38. I love the way you handle troubled times.

39. I love the way you respect me.

40. I love the way you protect and defend me.

41. I love how you feel when we cuddle.

42. I love the softness of your lips against mine.

43. I love the softness of you lips against my body.

44. I love the feeling of your hair brushing against me when we make love.

45. I love laying in bed at night talking about nothing.

46. I love waking up to find we’ve been cuddling together all night.

47. I love the surprises you leave for me.

48. I love your intelligence.

49. I love your ingenuity.

50. I love your ability to make friends where ever we go.

51. I love your love for life.

52. I love your passion for your hobbies and interests.

53. I love how every time I look at you, you take my breath away.

54. I love how I thank God everyday for bringing someone as wonderful as you into my life.

55. I love the fact you gave me the gift of our children.

56. I love the special moments that we shared that will remain my fondest memories of you and I.

57. I love spending the holidays with the one person I love the most.

58. I love how my heart skips a beat whenever you walk into the room.

59. I love how you love me.

60. I love how I love you.

61. I love the ways you choose to show your affection for me.

62. I love the way you inspire me to be more than I am.

63. I love the way you spark my creativity and imagination.

64. I love the way you make me feel like anything is possible as long as I’m with you.

65. I love your sense of humor.

66. I love the way you make me feel like royalty.

67. I love the way you dress.

68. I love your understated elegance.

69. I love you just the way you are.

70. I love your spontaneity.

71. I love our life together.

72. I love how if I died right now I would be the happiest person alive knowing I found my one true love.

73. I love the fact that we will grow old together.

74. I love your way with words.

75. I love the way you look when your sleeping.

76. I love the way you think you look awful when you first wake up when it is actually then I find you the most beautiful.

77. I love your willingness to share everything and most especially your heart with me.

78. I love your strength of character.

79. I love taking showers together.

80. I love the way you leave me love notes to find whenever you’re gone.

81. I love the way you treat me.

82. I love the way you take care of us.

83. I love your cooking.

84. I love the way you take the time to thank me for doing every day things.

85. I love the way you show your affection when we are around friends and/or family.

86. I love the way you are not scared to show your affection when we are in public.

87. I love your confidence.

88. I love your ability to make me feel better when times are tough.

89. I love the way we make up after a fight.

90. I love how you treat our children.

91. I love the way you support me when I’m off track.

92. I love the way you take the time to show me how much you love me.

93. I love your beautiful hair.

94. I love your body.

95. I love your openness to try new things.

96. I love your ability to talk things through.

97. I love your courage to be you.

98. I love your greatness.

99. I love the fact that you want to be with me and only me.

100. I love how I am and feel when I am with you!

101. I love you for you!

More Details onwww.weloved.com

* Log in as root

	$ su
        password (Give your root password here)

	# su -

* Make sure /etc/fstab has /dev/hda10 mounted to /test as ext2, read write or type “df” command

	# cat /etc/fstab

or

	# df

* Then type the following command to unmount

	# umount /dev/hda10

* If you can’t unmount it, then remount it again by typing the following command

        # mount -o remount,ro /dev/hda10

* Then type the following command to modify the silesystem type

        # tune2fs -j /dev/hda10

* Edit /etc/fstab, and for /dev/hda10, change ext2 to ext3

        # mount /dev/hda10

        # /sbin/shutdown -h now

        # mount | grep /dev/hda10

Now your system is ready to use with Ext3 journaling filesystem.

If you are using linux but don’t know how to format a pen drive, give a look at following commands. It makes you to format your USB pen drive.

First make sure USB pen is unmounted or otherwise Select USB pendrive on Desktop, then Right click > Select Unmount Volume.

Let us assume that /dev/sdb is your partition name for USB pen.
To know your partition name for USB, Open X terminal and type the command “df” before unmount the voloume.
Ex:

	$ df

Type the following command (Open X terminal and type the command)

	#su

	password (Enter your root password here)
	#su -
	# sudo mkfs.vfat /dev/sdb

Caution: Careful while entering device/partition name; wrong name can be damage your entire hard disk!!!

Now you are ready to use USB pen.

Thank you all my loyal readers.

From Admin.

What is Internet?

The Internet sometimes called simply ‘the Net’ is a world wide system of computer networks. It is the collection of network of networks that connects more than three million computers (called hosts). The Internet is the virtual space in which users send and receive email, login to remote computers (telnet), browse databases of information and send and receive programs (ftp) contained on these computers. The original aim was to create a network that would allow users of a research computer at one university to be able to “talk to” research computers at other universities.
Today, the Internet is a public, cooperative, and self-sustaining facility accessible to hundreds of millions of people worldwide. Physically, the Internet uses a portion of the total resources of the currently existing public telecommunication networks. Technically, what distinguishes the Internet is its use of a set of protocols called TCP/IP (for Transmission Control Protocol/Internet Protocol). Two recent adaptations of Internet technology, the intranet and the extranet, also make use of the TCP/IP protocol.
In a network numbers of computers are connected. In a network computer or host is distinguish with other only with IP address. In a network, two host can not have same IP addresses. If IP address of two computer is same then network can not be establish with them.

What is an IP address?

Every device connected to the public Internet is assigned a unique number known as an Internet Protocol (IP) address. It is a logical addresses of network adapter. IP addresses consist of four numbers separated by periods (also called a ‘dotted-quad’) and look something like 127.0.0.1. IP addresses can be start from 0.0.0.0 up to 255.255.255.255. That means every IP address must be a number within 0.0.0.0. and 255.255.255.255. These numbers are usually assigned to internet service providers within region-based blocks, an IP address can often be used to identify the region or country from which a computer is connecting to the Internet. An IP address can sometimes be used to show the user’s general location.
It will continue to the next post.

From Admin.

  • Generically, open source refers to a program in which the source code is available to the user for use and/or modification from its original design free of charge,i.e.,open.
  • Open source code is typically created as a collaborative effort in which programmers improve upon the code and share the changes within the community.
  • The promise of open source is better quality, higher reliability, more flexibility, lower cost, and an end to predatory vendor lock-in.
  • Why Open Source ?

    • Can use the software for any purposes
    • Can learn how the software is organized by reading the source codes.
    • Can share the software with others.
    • Can modify the software, and share the improved with others.
    • Mostly equals to ‘Free Software’
    • It’s copyrighted
    • Variety of the licensing terms

    Benefit of Open Source :

    • Open Source systems are dramatically less expensive than proprietary systems in initial cost.
    • The Open Source OS such as UNIX, Linux, Suse, Mendrin are free, easy to install and easy to use.
    • Bugs are fixed quickly and help is readily available through the vast support in Internet.

    What is a partition ?

    A hard disk partition is a defined as to divide a hard disk or storage space into multiple partitions or smaller logical hard disks.

    Why partition ?

    One of the goals of having different partitions is to achieve higher data security in case of disaster. By dividing the hard disk in partitions, data can be grouped and separated. When an accident occurs, only the data in the partition that got the hit will be damaged, while the data on the other partitions will most likely survive.

    What is File System ?

    A file system is nothing but describes how data and files are stored on your storage device. Every operating system has its own way of doing this.

    Hard Disk Partitions and File Systems

    You don’t actually store data in hard disk partitions. You store file systems in hard disk partitions and then you store data in these file systems. The information about the partition of the hard disk is stored in a table and that table is called partition table.

    Why File System ?

    The main goals of filesystems are as follows:

    • Higher performance
    • Less Data Redundancy
    • First Update
    • Reliability

    Some file system types store redundant copies of the data, while some file system types make hard drive access faster. The utility named parted, is used to manage the hard disk partitions.

    Linux File System

    It may seem strange that Linux uses more than one partition on the same disk, even when using the standard installation procedure. One of the most important features of Linux is it supports for many different file systems. Some of them are ext, ext2, ext3,swap, Redundant Array of Independent Disk(RAID),LVM.

    Types of file system

    • Disk file systems
    • Flash file systems
    • Database file systems
    • Transactional file systems
    • Network file systems

    Disk file systems

    A disk file system is a file system designed for the storage of files on a data storage device, most commonly a disk drive, which might be directly or indirectly connected to the computer. Examples of disk file systems include FAT(FAT12, FAT16, FAT32), NTFS, ext2, ext3.

    Ext File System(1992)

    Max FS size: 2GB
    Max file size: 2GB
    Max filename: 255 bytes
    The first attempt to improve the Ext file system the result is Ext2 file system.

    The Ext2 File System

    Ext2, stands for “second extended filesystem,”.Ext2 supports features including subdirectories, attributes, quotas, and locks. One potential problem with ext2 and many other filesystems is that in case of an improper system shutdown such as a power failure, an ext2 filesystem cannot be used until a filesystem consistency check (fsck) has been performed. The time taken for the consistency check is heavily dependent on the size of the filesystem: the bigger the filesystem, the longer it takes to finish the consistency check.

    The Ext3 File System

    The ext3 or third extended filesystem is a journaled file system that is commonly used by the Linux operating system. It is the default file system for many popular Linux distribution. Its main advantage over ext2 is journaling which improves reliability and eliminates the need to check the file system after an unclean or accidental shutdown.
    You can also convert your Ext2fs to Ext3 with command line. The conversion procedure is so easy.

    The Swap File System

    Swap space (indicated with swap) is only accessible for the system itself, and is hidden from view during normal operation. Swap space in Linux is used when the amount of physical memory(RAM) is full. If the system needs more memory resource and the physical memory is full, inactive pages in memory are moved to the swap space. Swap space is located on hard drive. On Linux, you will virtually never see irritating messages like Out of memory, please close some applications first and try again, because of this extra memory.
    Accessing the swap space is slower as compared to physical memory. Swap space is a dedicated swap partition.
    The size of your swap space should be equal to twice your computer’s RAM, but no more than 2048 MB (or 2 GB).

    The RAID File System

    The basic idea behind RAID is to combine multiple small, inexpensive disk drives into an array to accomplish performance or redundancy goals not attainable with one large and expensive drive. This array of drives will appear to the computer as a single logical storage unit or drive.
    RAID is a method in which information is spread across several disks, using techniques such as disk striping. The underlying concept of RAID is that data may be distributed across each drive in the array in a consistent manner.

    The LVM File System

    LVM stands for Logical Volume Manager. LVM is a method of allocating hard drive space into logical volumes that can be easily resized instead of partitions. With LVM, the hard drive or set of hard drives is allocated to one or more physical volumes. A physical volume can not span over more than one drive. Since a physical volume can not span over more than one drive, if you want the logical volume group to span over more than one drive, you must create one or more physical volumes per drive.

    The above four file system is supported by latest flavor of Linux.

    Next Page »