1.0 Syslog

Syslog is a protocol for conveying event notification messages.

Syslog was first developed by Eric Allman for logging as a part of the Sendmail project in the 1980s. It soon became a de-facto standard for logging on Unix-like systems.… Read more

Awk Tutorial

1.0 awk

awk is a filter which takes the input and gives output after matching desired patterns and doing processing linked to matched patterns. awk is well suited for processing voluminous raw text data and producing statistical reports from it.

awk is named after the first character of the names of its designers, Al Aho, Peter Weinberger and Brian Kernighan, who developed it for Unix systems in the 1970s.… Read more

grep Command in Linux

1.0 grep

grep is a program for searching a given string pattern in files. It searches the files for the pattern and prints the lines that contain strings matching the pattern. For example,

$ # grep pattern filenames ... 
$ grep 'hbox' find.c
    GtkWidget *window, *scrolled_win, *hbox, *vbox, *find;
    hbox = gtk_hbox_new (FALSE, 5);
    gtk_box_pack_start (GTK_BOX (hbox), w -entry, TRUE, TRUE, 0);
    gtk_box_pack_start (GTK_BOX (hbox), find, FALSE, TRUE, 0);
    gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);

2.0 grep Command Syntax

grep [OPTIONS] pattern [file ...]
grep [OPTIONS] [-e pattern | -f file ] [file ...]

3.0 Regular Expressions

The pattern, mentioned above, is a regular expression.… Read more

Trigonometric calculations with bc


bc, the basic calculator under Linux and UNIX environments, provides commands for doing arbitrary precision mathematical calculations. The syntax for basic arithmetic functions is intuitive. Here, we look at the commands for doing trigonometric calculations.


The global scale variable gives the number of digits after the decimal point.… Read more


The iostat command is for getting the CPU and input-output devices' statistics for Linux and Unix systems. For example,

$ iostat
Linux 3.0.0-14-generic (hostname) 	Wednesday 06 June 2012 	_i686_	(2 CPU)  

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          17.38    0.13    3.13    1.63    0.00   77.74

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda              11.78       111.65        69.79   11663838    7290650

The above output has two reports, the CPU utilization report and the device utilization report.… Read more

top Command in Linux

The Unix top command is useful for monitoring systems continuously for processes that take more system resources like the CPU time and the memory. top periodically updates the display showing the high resource consuming processes at the top. top is an excellent aid in checking a system.… Read more

ps command usage examples in Linux

The ps command gives information about processes on a Linux or Unix system. Our programs run as processes in the system. Also, for each installed package, there might be one or more processes. So, to find out what is happening in the system, the first instinctive action is to find out about processes running in the system by using the ps command.… Read more