Next: , Previous: Environment Vars, Up: Top

14 Data Files

The units program uses two default data files: definitions.units and currency.units. The program can also use an optional personal units data file .units (unitdef.units under Windows) located in the user's home directory. The personal units data file is described in more detail in Units Data Files.

On Unix-like systems, the data files are typically located in /usr/share/units if units is provided with the operating system, or in /usr/local/share/units if units is compiled from the source distribution.

On systems running Microsoft Windows, the files may be in the same locations if Unix-like commands are available, a Unix-like file structure is present (e.g., C:/usr/local), and units is compiled from the source distribution. If Unix-like commands are not available, a more common location is C:\Program Files (x86)\GNU\units (for 64-bit Windows installations) or C:\Program Files\GNU\units (for 32-bit installations).

If units is obtained from the GNU Win32 Project (, the files are commonly in C:\Program Files\GnuWin32\share\units.

If the default units data file is not an absolute pathname, units will look for the file in the directory that contains the units program; if the file is not found there, units will look in a directory ../share/units relative to the directory with the units program.

You can determine the location of the files by running units --version. Running units --info will give you additional information about the files, how units will attempt to find them, and the status of the related environment variables.