Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux configuration file libraries [closed]

Are there any good configuration file reading libraries for C\C++ that can be used for applications written on the linux platform. I would like to have a simple configuration file for my application. At best i would like to steer clear of XML files that might potentially confuse users.

like image 817
jcodeninja Avatar asked Sep 29 '08 08:09

jcodeninja


People also ask

Where are Linux configuration files stored?

The vast majority of Linux config files can be found in the /etc/ directory or a sub-directory. Most of the time these configuration files will be edited through the command line, so get comfortable with applications like Nano or Vi.

How do I open a CFG file in Linux?

To edit any config file, simply open the Terminal window by pressing the Ctrl+Alt+T key combinations. Navigate to the directory where the file is placed. Then type nano followed by the filename that you want to edit. Replace /path/to/filename with the actual file path of the configuration file that you want to edit.

What is .cfg file in Linux?

A CFG file is a generic preference file that stores settings and configuration information. It is used by various programs, which means different CFG files may store data in different formats. CFG files typically should not be opened manually but may be saved in a text format that can be viewed in a text editor.

What is Libconfig package?

Libconfig is a simple library for manipulating structured configuration files. This file format is more compact and more readable than XML. And unlike XML, it is type-aware, so it is not necessary to do string parsing in application code. Website: https://hyperrealm.github.io/libconfig/


1 Answers

I would recommend 'libconfig'.

like image 57
ayaz Avatar answered Oct 04 '22 03:10

ayaz