Proxy setting for wget command using terminal

Gallery

You can give proxy parameters while use wget command in linux. Here is command for proxy parameters, $ wget -e use_proxy=yes -e http_proxy=192.168.1.10:8080 <download_URL> You can use https_proxy and/or ftp_proxy variable as per need in wget command instead of http_proxy … Continue reading

Standalone Single Instance in Linux

Gallery

Given code will help to create standalone single instance of application in Linux operating system. #include <stdio.h>#include <semaphore.h>#include <fcntl.h> int main(){    const char sem_name[] = “tmp”;    sem_t * mutex;     printf(“semaphore application started!\n”);    mutex = sem_open(sem_name, O_CREAT | O_EXCL, 0600, … Continue reading

How to setup “libpcap” environment on Ubuntu

Gallery

Following steps will be required to prepare libpcap environment on Ubuntu. Download “libpcap” file from http://www.tcpdump.org/release/libpcap-1.3.0.tar.gz Use following commands sequentially to install “libpcap” package, $ sudo ./configure – prefix=/usr && make $ sudo make install In case, you faced problem … Continue reading

Linux command to operate network connections

Gallery

Following commands can give network connections information, # netstat -tulpan # lsof –i Command#1 (netstat –tulpan) will give you connections information, but I did not find any way to kill connection after get information from it. Command#2 (lsof –i) will … Continue reading

Few common POSIX Regular Expression

Gallery

Following POSIX Regular Expression will be needed commonly while developing application, ALPHA_REG_EXPRESSION = "[a-zA-Z ]*" ALPHA_UNDERSCORE_REG_EXPRESSION = "[a-zA-Z_ ]*" ALPHA_NUMERIC_REG_EXPRESSION = "[a-zA-Z0-9 ]*" ALPHA_NUMERIC_UNDERSCORE_REG_EXPRESSION = "[a-zA-Z0-9_ ]*" ALPHA_NUMERIC_UNDERSCORE_DASH_REG_EXPRESSION = "[a-zA-Z0-9_[-] ]*" DECIMAL_REG_EXPRESSION = "[0-9]*[.][0-9]*" INTEGER_REG_EXPRESSION = "([1-9][0-9]*)|0" ADDRESS_REG_EXPRESSION = "[,.#_a-zA-Z0-9- … Continue reading