.TH "md_src_plugins_hosts_README" 3elektra "Sun May 29 2016" "Version 0.8.14" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME md_src_plugins_hosts_README \- README .IP "\(bu" 2 infos = Information about HOSTS plugin is in keys below .IP "\(bu" 2 infos/author = Markus Raab elektra@libelektra.org .IP "\(bu" 2 infos/licence = BSD .IP "\(bu" 2 infos/needs = .IP "\(bu" 2 infos/provides = storage .IP "\(bu" 2 infos/placements = getstorage setstorage .IP "\(bu" 2 infos/recommends = glob network .IP "\(bu" 2 infos/description = This plugin reads and writes /etc/hosts files\&. .PP .PP The /etc/hosts file is a simple text file that associates IP addresses with hostnames, one line per IP address\&. The format is described in hosts(5)\&. .PP .SS "Special values" .PP .SS "Hostnames" .PP Canonical hostnames are stored as key names with the IP address as key value\&. .PP .SS "Aliases" .PP Aliases are stored as sub keys with a read only duplicate of the associated ip address as value\&. .PP .SS "Comments" .PP Comments are stored according to the comment metadata specification (see doc/METADATA\&.ini for more information) .PP .SS "Multi-Line Comments" .PP Since line breaks are preserved, you can identify multi line comments by their trailing line break\&. .PP .SS "Restrictions" .PP The ordering of the hosts is stored in meta keys of type 'order'\&. The value is an ascending number\&. Ordering of aliases is NOT preserved\&. .PP .SS "Examples" .PP Mount the plugin: >$ kdb mount /etc/hosts system/hosts hosts .PP Print out all known hosts and their aliases: >$ kdb ls system/hosts .PP Get IP address of host 'localhost': >$ kdb get system/hosts/localhost Fetch comment belonging to host 'localhost': >$ kdb getmeta system/hosts/localhost comment