man cvtstatic (Commandes) - convert an /etc/hosts file to updatehosts database format

NAME

cvtstatic - convert an /etc/hosts file to updatehosts database format

SYNOPSIS

cvtstatic [ -a ] [ -c -d default_domain [ -h ] [ -i ip_address_prefix ] -o output_directory

DESCRIPTION

cvtstatic is a utility to convert an existing /etc/hosts file to updatehosts format. The hosts file is read from stdin. The output is a set of updatehosts relations located in the directory specified by the -d option.

The -a will append output to an already existing set of relations.

The -c option will add comments from the zone file. The comments are placed in the same location they are found in the zone file.

The -d option is required and specifies the default domain name for this set of input records.

The -h option outputs a short command synopsis.

The -i option specifies an option IP address prefix for the IP addresses found in A records.

The -o option which is required specifies a directory where the updatehosts relations are found.

Readinfo Record Generation

cvtstatic generates readinfo records using the default domain and the IP address prefix to generate a correct #FIELDS line which allows domain names and IP addresses to be written in a shorthand manner. All domains are shortened by chopping off the default domain name suffix. Those domain names which are in a different domain are written fully qualified with a trailing period.

If the -i option is present all IP addresses which start with the IP prefix have it removed. All other IP address will be written as a standard dotted decimal IP address with a leading period ("."). The leading period denotes that the default IP prefix is not prepended to the address. Without the -i option all IP addresses are written in standard dotted-decimal notation and there is no default prefix for IP addresses.

Each invocation of cvtstatic generates a new readinfo #FIELDS line. This is convenient when converting multiple hosts files where the default domain or the default IP prefix have different values.

See also