Technology Weblog

Archive for the ‘unix’ Category

Disabling the annoying system beep in Linux !

July 28, 2008

System beeps every time you press the backspace key one too many times, or just using emacs, can be quite disturbing. To shut them off: Just open your .bashrc file. vi ~/.bashrc and add the following xset b off xset b 0 0 0

Preventing man page contents from getting cleared

June 19, 2008

man pages are great help for learing new commands in *nix systems. There will be hardly any unix user who have not used it . When learning about new commands or options of commands using man pages it is a annoyance that man page contents get cleared on quiting man. We can change this behiavior […]

Cool trick to navigate directories using cd !

March 4, 2008

Everyone using Linux will like to use it to navigate easily between directories. Add the following code into .bashrc file. Now you can navigate foward and backward using cd ] and cd [ . Cool ! __COUNT=0 __BACK=0 cd () { if [ “${1}” = “[” ]; then if [ “${__BACK}” -lt “${__COUNT}” ]; then […]

Running PHP4 and PHP5 concurrently.

January 18, 2008

Running PHP4 and PHP5 There are many times when we need PHP4 and PHP5 to run concurrently on the server.In such cases we can Install one as apache module and other as CGI Install PHP4 or PHP5 as apache module. Lets install PHP5 as apache module Download PHP5 untar it and move to its directory. […]

Enabling spell checking for bash

December 27, 2007

shopt is a built-in command that controls shell behavior. In order to customize our shell environment we add the shopt commands to our .bashrc file. shopt -s cdspell This will correct the typing mistakes for cd command. eg: We need to go to directory testing/default. But by mistake type # cd tesring/default testing/default Since we […]

Perl commandline search and replace

December 22, 2007

There are many times when we need to search and replace certain words from files. Doing it manually will be very time consuming. One way to do it is using VI ( my favorite editor !) search n’ replace. The better option is using perl command line search and replace option. The syntax is the […]

4 Incredible sites to learn Shell scripting !

December 6, 2007

There are lots of online recources to learn shell scripting. I have list the best 4 of them and they cover mainly the my favourite shell BASH ( the best one too !). Bash tutorial | Programming tutorials Advanced Bash-Scripting Guide BASH Cures Cancer Heiner’s SHELLdorado Enjoy !