Sponsored Content
Full Discussion: Ip
Top Forums UNIX for Dummies Questions & Answers Ip Post 302106460 by sb008 on Thursday 8th of February 2007 05:42:39 PM
Old 02-08-2007
I would say use the "ifconfig" command.

Allthough it's not common for Unix systems, but a system could get it's IP from a DHCP server. There are even other options where the systems IP is not necessary in the /etc/hosts file.

So, consulting the host file is no guarantee for success.
 
GEOIPLOOKUP(1)						      General Commands Manual						    GEOIPLOOKUP(1)

NAME
geoiplookup - look up country using IP Address or hostname SYNOPSIS
geoiplookup [-d directory] [-f filename] [-v] <ipaddress|hostname> DESCRIPTION
geoiplookup uses the GeoIP library and database to find the Country that an IP address or hostname originates from. For example geoiplookup 80.60.233.195 will find the Country that 80.60.233.195 originates from, in the following format: NL, Netherlands OPTIONS
-f Specify a custom path to a single GeoIP datafile. -d Specify a custom directory containing GeoIP datafile(s). By default geoiplookup looks in /var/lib/GeoIP -v Lists the date and build number for the GeoIP datafile(s). AUTHOR
Written by T.J. Mather REPORTING BUGS
Report bugs to <support@maxmind.com> COPYRIGHT
Copyright (C) 2006 MaxMind LLC This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
geoipupdate(1), nslookup(1). 4th Berkeley Distribution 2 Jan 2007 GEOIPLOOKUP(1)
All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy