Adnan Khurshid on February 6th, 2011

To display the files sorted in ascending order, we use the command ‘sort’. Suppose we have the following file and we want to sort out the data. linux:~ # more sort.txtBarrack ObamaGeorge BushBill ClintonRonald ReaganJimmy Carterlinux:~ # To sort the file we use the following command:

Continue reading about How to sort files in Linux

Adnan Khurshid on February 6th, 2011

The environment variables are used by the shell and its child processes for normal execution of the programs. However, there are times when there is a need to add new variables for specific applications to work. First of all, check the environment parameters with ‘env’ command as shown below: To add the parameter simply use […]

Continue reading about How to add environment variables in Linux/Unix

Adnan Khurshid on February 2nd, 2011

Capturing the packets on a given interface is vital for troubleshooting problems caused by the application or even network. The commercial servers have multiple Ethernet cards some of which are active and others in a standby mode. In this situation, we must for know which interface card is active and then make the trace on […]

Continue reading about How to capture packets on Ethernet interface in SUN Solaris

Adnan Khurshid on February 1st, 2011

If you need to drop a table in informix and create it again, you require the script which was initially used to create that table. To get the SQL script, we use dbschema command. Most frequently, the command is used in the following format. dbschema -d <database> -t <tablename> -ss <file_name>                                                                             |__ To Generate Server […]

Continue reading about How to retrieve SQL script for table creation from Informix

Adnan Khurshid on February 1st, 2011

Most of the programs use dynamic linked libraries so that they can take advantage of pre-prepared procedures in those libraries. However, if such a program doesn’t find the required library present on the system, it won’t run. In such a situation, you can use the ‘ldd’ command to check how many libraries that program is […]

Continue reading about How to check shared libraries dependencies in Linux

Adnan Khurshid on January 29th, 2011

The file /etc/fstab contains the information about the mounted systems. The system reads this configuration at start-up to mount the required partitions on to the file system. An example of this file is shown below: As you can see, this file has all the information about the mounted partitions. Now, you can take a separate […]

Continue reading about How to backup the critical partition data in Linux servers

Adnan Khurshid on January 29th, 2011

The design of the hard drive and the formation of the partitions of the file system varies from server to server. It mainly depends upon how much hard disk space is available and which applications would be installed on the server. If the server space is low, which should not be the case with commercial […]

Continue reading about How to design a hard drive layout (partitioning) on Linux servers

Adnan Khurshid on January 28th, 2011

Usually, the switching between GUI and command line interface becomes essential for example, there can be a situation where a server might be having resource problems with its existing specifications. To enhance performance, one might shun the GUI. This can be done by simply changing the run level of the system. If the system is […]

Continue reading about How to switch between GUI and command line interface in Linux

Adnan Khurshid on January 28th, 2011

The ‘shutdown’ command brings the system down in a secure and planned manner. By default, running this command with no options will bring the system to a single user mode. However, options can be used with this command to halt or reboot the system. Take some examples as follows: linux:/ # shutdown -r now The […]

Continue reading about How to shutdown/restart the Linux/Unix servers

Adnan Khurshid on January 28th, 2011

The run level determines which services will run and which will be stopped during system initialization. The run levels are given below:    0   Halt the system.   1    Single-user mode (for system maintenance).   2    Local Multiuser with Networking but without network service (like NFS)   3    Full Multiuser with Networking   4    Not Used   5    Full Multiuser […]

Continue reading about Changing run levels for Linux/Unix