≡ Menu


Use export Command in Linux / Unix

How do I use export command under a Linux or Unix-like operating systems to set variables on a bash shell?
[click to continue…]

Bash Remove Last Character From String / Line / Word

I have a file of that looks as follows:

foo bar
tom jerry
UNIX Linux

Each word and/or Linux is a different length. How do strip or remove the last character from each line using bash or ksh shell only on a Linux or Unix-like systems?
[click to continue…]

Linux / UNIX: Bash Script Sleep or Delay a Specified Amount of Time

How do I pause for 5 seconds or 2 minutes in my bash shell script on a Linux or Unix-like systems?
[click to continue…]

Bash Infinite Loop Examples

How do I write an infinite loop in Bash script under Linux or UNIX like operating systems?
[click to continue…]

Linux: rsync Copy Directories Structures Tree Only

I am looking for to only sync directories structures only. How do I copy directory structure tree without copying any files under Linux or UNIX operating system to remove server or local directory?
[click to continue…]

Linux / UNIX: Bash Loop Forever

I need to cycles through a loop forever using for or while syntax. How do I set such loop under UNIX or Linux operating systems?
[click to continue…]

Linux / UNIX: bc Convert Octal To Hexadecimal or Vise Versa

How do I convert from octal to hex number using bc UNIX / Linux command line utility?
[click to continue…]

Iptables Drop IP Address

How do I block particular IP addresses or host with the iptables command under Linux?
[click to continue…]

vi Find And Replace Text Command

How do I find and replace (substitute) test using vi or vim text editor under UNIX / Linux / BSD or Apple OS X operating systems?
[click to continue…]

nginx: Send HTTP User Agent Requests To Specific Backend Server

I've tons of images, css and javascript hosted at backend server IP and How do I make sure nginx reverse proxy load balancer always send all http_user_agent requests coming from "Mozilla" to server and MSIE to server only?
[click to continue…]