kill command can be used to terminate a running process. Typically this command is used to kill processes that are hanging and not responding.
[continue reading…]

df command (disk free) displays the amount of total and free disk space available on the mounted filesystems.
[continue reading…]

ps command (process status) will display snapshot information of all active processes.
[continue reading…]

top command displays real time information about various performance metrics of the system such as CPU Load, Memory Usage, Processes list etc.
[continue reading…]

Free command displays all the necessary information about system physical (RAM) and swap memory.

Syntax: free [options]

[continue reading…]

This example shows how to read a particular field from a data-file and manipulate it inside a shell-script. For example, let us assume the employees.txt file is in the format of {employee-name}:{employee-id}:{department-name}, with colon delimited file as shown below.
[continue reading…]

Let us review how to use single quote and double quote inside a shell script.

Following example displays an echo statement without any special character.
[continue reading…]

To debug a shell script use set –xv inside the shell script at the top.
[continue reading…]

Use the $RANDOM bash built-in function to generate random number between 0 – 32767 as shown below.
[continue reading…]

What is the sequence in which the following files are executed?

  • /etc/profile
  • ~/.bash_profile
  • ~/.bashrc
  • ~/.bash_login
  • ~/.profile
  • ~/.bash_logout

[continue reading…]