Tuesday, April 29, 2008

HowTo: Retrieve Current Latitude and Longtitude from Linux

Do you know your exact zone longitude and latitude coordinates? Knowing your current zone coordinates won't hurt a bit. Here's how to retrieve latitude and longitude coordinates inside your linux box via terminal.

To pinpoint your latitude and longitude of your current location from your Fedora box, follow the following command sample

How to Retrieve Latitude/Longitude Coordinates from Linux box

# grep -i manila /usr/share/zoneinfo/zone.tab
result:
PH +1435+12100 Asia/Manila

Legend:
First Column : Country Code
Second Column: Latitude and Longitude Coordinates
Third Column: Time Zone (usually following the continent/city format)

Let's try another one.

# grep -i singapore /usr/share/zoneinfo/zone.tab
# grep -i new_york /usr/share/zoneinfo/zone.tab

result:
SG +0117+10351 Asia/Singapore

That's it.

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy