1IP2LOCATION(1)              General Commands Manual             IP2LOCATION(1)
2
3
4

NAME

6       ip2location  -  query IP address information from local IP2Location BIN
7       data file
8
9

SYNOPSIS

11       ip2location --data-file [IP2LOCATION BIN DATA PATH] --ip  [IP  ADDRESS]
12       [OPTIONS]
13
14

DESCRIPTION

16       ip2location  read  the IP address, IPv4 or IPv6 address format, and get
17       the information from IP2Location BIN data file for display.
18
19       User may provide the IP address as standard input  or  file  containing
20       one  IP address per line. Several output formats supported such as CSV,
21       TAB and XML.
22
23       You can download the IP2Location BIN data file from http://www.ip2loca
24       tion.com or http://lite.ip2location.com
25

EXAMPLES

27       ip2location --data-file [IP2LOCATION BIN DATA PATH] --ip [IP ADDRESS]
28              Query an IP address and display the results on screen
29
30       ip2location --data-file [IP2LOCATION BIN DATA PATH] --input-file [INPUT
31       FILE PATH]
32              Query all IP addresses from an input file and  display  the  re‐
33              sults on screen
34
35       ip2location --data-file [IP2LOCATION BIN DATA PATH] --input-file [INPUT
36       FILE PATH] --format XML
37              Query all IP addresses from an input file and  display  the  re‐
38              sults in XML format on screen
39
40       ip2location --data-file [IP2LOCATION BIN DATA PATH] --input-file [INPUT
41       FILE PATH] --format TAB --output-file [OUTPUT FILE PATH]
42              Query all IP addresses from an input file and output the  result
43              to a file in TAB format
44
45       ip2location  --data-file  [IP2LOCATION BIN DATA PATH] --ip [IP ADDRESS]
46       --field country_code -0-heading
47              Query an IP address and display the country_short result
48
49       ip2location --data-file [IP2LOCATION BIN DATA PATH] --ip  [IP  ADDRESS]
50       --field country_code,city_name -0-heading --format TAB
51              Query  an  IP address and display the country_short and city re‐
52              sult
53
54

OPTIONS

56       -b, --bin-version
57           Print the IP2Location BIN database version.
58
59       -d, --data-file
60           Specify the path of IP2Location .BIN data file.
61
62       -i, --input-file
63           Specify an input file with IP address list.
64
65       -p, --ip
66           Specify an IP address query (Supported IPv4 and IPv6 address).
67
68       -o, --output-file
69           Specify output file for query results.
70
71       -f, --format
72           Specify output format. Supported formats are:
73               - CSV (default)
74               - TAB
75               - XML
76
77       -h, -?, --help
78           Display this help file
79
80       -v, --version
81           Display the version number
82
83       -e, --field
84           Specify the field to be displayed. Supported values are:
85               - ip
86               - country_code
87               - country_name
88               - region_name
89               - city_name
90               - isp
91               - latitude
92               - longitude
93               - domain
94               - zip_code
95               - time_zone
96               - net_speed
97               - idd_code
98               - area_code
99               - weather_station_code
100               - weather_station_name
101               - mcc
102               - mnc
103               - mobile_brand
104               - elevation
105               - usage_type
106               - address_type
107               - category
108               - district
109               - asn
110               - as
111
112       -n, -0-heading
113           Suppress the heading display.
114
115

[AUTHORS]

117       This tool was created by IP2Location (https://www.ip2location.com).
118
119

[COPYRIGHT AND LICENSE]

121       Copyright 2001-2023 IP2Location.com
122
123       This tool is licensed under MIT.
124
125
126
127                                                                IP2LOCATION(1)
Impressum