Analyzing the NGINX web server log file

  • by

1.0 Introduction

Given an nginx web server log file, we might like to know who are the visitors to our website. One can go line by line through the log file, but that is tedious. It would be nice if we can get one line per client visiting the website, giving the IP address of the visitor and how many times that client has visited.… Read more

Using Git

  • by

1.0 Introduction

Git commands for common source code management use cases are listed.

2.0 Install Git

On an Ubuntu Linux system, Git can be installed with the command,

$ sudo apt-get install git

3.0 Set Identity

Before using Git, the user's identity (name, email) has to be set

$ git config --global
Read more

Bash idioms

  • by

In a nutshell

bash idioms are tiny scripts, mostly one-liners, that accomplish a lot and can be used as building blocks in bigger scripts.

1.0 Find most frequent words

Suppose we have a bunch of text files and we wish to find the most frequently used words in those files, we can do that with the command,

cat * | tr -sc '[:graph:]' '\n' | sort | uniq -c | sort -nr

First, we capture all input with cat and pipe it to the tr command.… Read more

Comm Command in Linux

  • by

1.0 comm

The comm command compares two sorted files and gives output in three columns. The first column has lines which are present only in the first file. The second column contains lines which are present only in the second file.… Read more

grep Command in Linux

  • by

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
Read more

Bash Tutorial

  • by


A shell provides a user interface to a computer system. There are two types of shells, the command line interface (CLI) and the graphical user interface (GUI). In this tutorial, we describe the command line interface shell only and refer to it simply as shell.… Read more

umask in Linux

  • by

File Permissions

In Linux, each files has nine permission bits. There are three basic permissions, read (r), write (w) and execute (x), for a file. These three permissions are there for the owner (o) of the file, the group (g) set for the file and the "others" (o).… Read more

Modern design digital clock in Belgrade


  • by

cron is a daemon that executes programs for users periodically at predefined times. The cron daemon or service is started by the init process during system initialization. cron comes from chronos, the Greek word for time. cron was authored by Brian Kernighan in Version 7 Unix.… Read more