How to Search for an Exact String With GREP

GREP is one of those simple UNIX programs that you can’t live without if you do any kind of systems administration of an operating system based on UNIX such as Linux or Mac OS X. If you need to search for an exact string and NOT just a substring, all you have to do is specify the “-w” command line switch. For example, say you wanted to search for the string “username” in a text file named “login.php” that contains the following lines:

username = "foo";
groupusername = "myGroupUserName";
defaultusername = "defaultUser";

If you try the command:

grep “username” login.php

all of the lines in the file would be returned since they all contain the substring “username” somewhere in the line.

locahost ~: grep "username" login.php
username = "foo";
groupusername = "myGroupUserName";
defaultusername = "defaultUser";

However if you specify the “-w” command line switch, only the first line will be returned:

localhost ~: grep -w "username" login.php
username = "foo";

Terminal

If You’re Tired of Answering Simple Tech Support Questions…

This post is more for people that are tired of receiving technical support questions which are easily answered with a simple Google search. I don’t mind receiving questions from paying clients, it’s the family and friends seeking free computer help that gets annoying sometimes. There is a very clever website called “Let Me Google That For You” which will allow you to type in a Google search phrase like you normally would except this website will generate a URL that you can give to someone which will graphically illustrate what you did. When the person you give this URL to loads it in their web browser what they see is a short animation of you typing in the Google search phrase along with an obnoxious caption explaining each step that is done in an almost child-like manner. It sort of points out how easy it is to find the information yourself rather than bothering someone else for help.

Here is a demo of what the website produces for a simple search I did: http://tinyurl.com/7hasnj

Here is the URL for the Let Me Google That For You Website: http://www.letmegooglethatforyou.com

Google Logo

How to Remove Saved SSL Certificates in Filezilla

If you have Filezilla installed in Windows XP delete the following user specific file:

\Documents and Settings\UserName\Application Data\FileZilla\trustedcerts.xml

Replace “UserName” with the username of the user account that was running the Filezilla program when the SSL certificates were saved.

If you have Filezilla installed in Vista delete the following file:

C:\Program Files (x86)\FileZilla\Trusted Certs.dat

Change “C:\Program Files (x86)\FileZilla\” to the directory you installed Filezilla to if you did not go with the default installation location.

SSL Certificate
SSL Certificate

Portecle Error: Could not load keystore as type PKCS12

If you encounter the error

net.sf.portecle.crypto.CryptoException: Could not load keystore as type PKCS12

while trying to open an OpenSSL created PKCS12 type keystore file, that means you need to install the Java Unlimited Strength Jurisdiction Policy files into your JAVA runtime environment. Due to U.S. export restrictions, practically all JAVA runtime environments are crippled such that they cannot utilize high encryption algorithms. You must manually install the “Unlimited Strength Jurisdiction Policy” files from the JAVA homepage and install them into your JAVA runtime environment.

You can download the “Unlimited Strength Jurisdiction Policy” files from the official JAVA download site: http://java.sun.com/javase/downloads/

Usually the policy files are installed into the ./lib/security subdirectory of your JAVA runtime environment directory.