Archive

Archive for the ‘Command Line’ Category

Fix ‘Unkown host’ Error on Mac

January 26th, 2012

Have you ever had one of your websites become inaccessible on only one of your computers? The site loads up fine on every other machine you try it on but on this one machine, nada. If you try to ping the domain you’ll likely be presented with an ‘unknown host’ error.

If your computer is a Mac you will likely first think to try dscacheutil -flushcache . However, this will not work for you unless you are using an older version of OS X. Now what you’ll have to do is the following:

sudo killall -HUP mDNSResponder

In most cases this is what will work for you. I won’t bore you with a lengthy explanation of why. Just try it.

Apple, Command Line, Mac, Web

Command Line Tip: Position Cursor with the Mouse

November 26th, 2010
command line tip - place your cursor with the mouse

Place your cursor with the mouse

When entering long commands in the terminal, making changes or fixing mistakes in the middle of the command can slow you down. Moving your cursor over one character at a time to get the to point where the change is needed takes too much time! Fortunately on a Mac you can actually use your mouse to position the cursor wherever you want in the current line.

The trick is to hold down the ‘Option’ key while clicking. Move your mouse pointer where you want the cursor and ‘Option-Click’. When doing this the cursor will actually move to that point in the line. I didn’t believe it until I tried it. It really works! Another command line time saver.

Apple, Command Line, Mac , , , , ,

Command Line Tip: Start of Line – End of Line

July 17th, 2010

If you like to work from the command line there are many keyboard shortcuts that can make your life easier. Two of my favourites are control+a and control+e. When you are have some text entered and you want to quickly get to the start or end of the entered text these little shortcuts will save you some key-presses.

ctrl + a: moves the cursor to the start of the line

ctrl + e: moves the cursor to the end of the line

Many of you will already know about these handy shortcuts but if you haven’t I think you’ll really appreciate them.

Command Line, Mac , , , , , ,

SEO Powered by Platinum SEO from Techblissonline