Useful reference info at your OS X fingertips

Aug 05, '02 09:07:20AM

Contributed by: Anonymous

Want to know the airport code for Newark, NJ? Need to find out where the 90210 zip code is? How about the international dialing code for Papua New Guinea? Or the significance of giving a Peach Blossom as a gift? Need to covert liters to gallons?

Mac OS X knows all of these things and more! Check out the /usr/share/misc directory. There you'll find a bunch of text files with all of these reference guides and more. To search for information, use the grep command. For example:

  % grep 90210 /usr/share/misc/zipcodes
This returns:
90210:Beverly Hills, CA
If you're searching for text, remember that grep is case sensitive unless you include the -i option to ignore case (grep -i text_to_find). Want to find all references to Denver in the entire directory? Try:
  % grep -i Denver /usr/share/misc/*
This returns the airport code from "airport", the area code from "na.phone", and the zip codes from "zipcode" for all entries which contain "Denver" or "denver".

Granted all of this information can be found on the net in various places, but it's much faster to use the local reference. The web has the advantage of more current data, of course, but the local file searches are fast!

Comments (18)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020805090720424