logo
  • Products
  • Speaking
  • About
  • Blog

Unix Tips & Tricks

16 November,2007 by Poornima in Software DevelopmentAWK, Command (computing), Filename, Grep, Operating system, Print (command), Unix, Windows One Comment

I’ve spent the last week in Unix system land, and boy has it been painful! I thought I’d share some of the tips and tricks to save time and aggravation.

1. If you’re coding on a Windows machine, and you hear that annoying “BEEP” everytime you make a mistake in mysql or in a command prompt save yourself from being embarrassed and infuriating your co-works by typing:

>net stop beep

2. Trying to connect to a port that is already in use results in a:

Port already in use: <port #>; nested exception is: java.net.BindException: Address already in use

To find out if the port is already in use, use the following command, and then kill the associated process:

>netstat

3. One of my coworkers added color to grep, which helps tremendously when trying to search for key words that are embedded deep within text.

grep –color RED # add it to your .alias or .bash_profile file

4. This next tip will hopefully save a lot of time debugging scripts, if you have the following lines:

if [ `whoami` != “poornima” ] ; then

echo “Please run this script as user poornima.”

exit 1

fi

There must be a space between the close ” and ] or else the script will error when run.

5. To search for any process name issue the following command:

> ps -ef | grep “keyword(s) you’re looking for”

Enhanced by Zemanta
Tweet
Pocket
Share on reddit
Share on LinkedIn
Bookmark this on Digg

Related Posts:

  • Code loving girl meets design loving boy
  • Class Cast Exception is a Proxy Problem
  • Cheap Tricks to Fullfill Your Need for Speed
  • Ruby Tuesday: Debugging
  • Pre-Launch Prep
  • Mistaken About Making Mistakes

Join 10K+ techies & receive a little inspiration in your inbox weekly, to help you create, innovate & do your most meaningful work!

1 Comments

  1. best registry fixer says:
    May 24, 2010 at 3:37 pm

    excellent post,but i get some difficulty in understanding the last paragraph, could you please explain a little bit in depth?

Comments are closed.

  • © 2017 Femgineer
  • |
  • Privacy and Terms of Use

Powered by Wordpress

  • Press
  • Contact Us
btn hover btn hover
Go to mobile version