script

Analyzing the NGINX web server log file

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 …

Analyzing the NGINX web server log file Read More »

sed command in Linux

1.0 sed sed is a stream editor that accepts a list of commands and input file names. It applies the commands one by one on each line of input and writes the resulting lines on the standard output. The commands are separated by newlines. 2.0 sed Command syntax sed [OPTIONS] ‘list-of-sed-commands’ filenames … sed is …

sed command in Linux Read More »

Shell Scripting Tutorial

1.0 Shell Script bash is the commonly used shell in GNU-Linux. bash can be run interactively, as a login shell or as an interactive process from a terminal emulator like the gnome-terminal. bash can be run non-interactively by running a bash script. A shell script, or bash script, is a list of commands written to …

Shell Scripting Tutorial Read More »

iptables command in Linux

1.0 iptables The iptables command is for defining rules for packet filtering for establishing and configuring firewalls in Linux. iptables, also, helps in configuring the Network Address Translation (NAT) for placing a local area network behind a single public IP address for accessing the Internet and for other uses. The network communication takes place in …

iptables command in Linux Read More »