How to edit the hosts file in Mac OS X 10.7 – Lion

The hosts file is a text file that maps hostnames to IP addresses. Upon typing a url address in the browser, the system first checks if there is a relevant entry in the hosts file and if exists gets the corresponding IP address. If no entries exists it resolves the IP via the active connection’s DNS servers.

The hosts file can be edited to block certain hostsnames, like ad-serving/malicious hosts, or used for web development purposes, i.e. to redirect domains to local addresses.

Continue reading

Unhide Library Folder in Mac OS X 10.7 – Lion

In Mac OS X Lion (10.7), Apple has made the user Library folder hidden. Preferences, presets, and other user customisation settings are stored within this Library folder.

There are two ways to access this folder:

Temporary

To keep the folder hidden and to access it sporadically:

  1. In Finder, choose Go > Go To Folder
  2. In the Go To Folder dialog, enter ~/Library
  3. Click Go

Permanent

To unhide the folder permanently:

  1. Open a Terminal session
  2. Enter the following command (replace <username> with your actual username
  3. chflags nohidden /Users/<username>/Library
  4. Quit Terminal

Taking Screenshots in Mac OS X

Quick post on how to take screenshots using keyboard shortcuts.

Save to File:

CMD+SHIFT+3

Take a screenshot of the entire screen and save it as a file on the desktop

CMD+SHIFT+4

Select an area and take a screenshot of that area, save as file on the desktop

CMD+SHIFT+4 followed by SPACE

Click on a window and take a screenshot of that window, save as file on the desktop

Save to Clipboard

CMD+CTRL+SHIFT+3

Take a screenshot of the entire screen and save it to the clipboard

CMD+CTRL+SHIFT+4

Select an area and take a screenshot of that area, save it to the clipboard

CMD+SHIFT+4 followed by SPACE

Click on a window and take a screenshot of that window, save it to the clipboard

How to edit the hosts file in Mac OS X 10.6 – Snow Leopard

The hosts file is a text file that maps hostnames to IP addresses.  Upon typing a url address in the browser, the system first checks if there is a relevant entry in the hosts file and if exists gets the corresponding IP address.  If no entries exists it resolves the IP via the active connection’s DNS servers.

The hosts file can be edited to block certain hostsnames, like ad-serving/malicious hosts, or used for web development purposes, i.e. to redirect domains to local addresses.
Continue reading

Show the Size of Selected Files on Mac OS X

Here’s a quick tip to show the file size of selected files/folders.  Generally the status bar of the Finder windows shows the count of selected files and the available hard drive space, but doesn’t show the file size.  On a single file you can right-click the file and select ‘Get Info’ (Apple/Command+i) which will pop-up the ‘Get Info’ floating window, but this is no good for multiple file selection.

Continue reading