/var/state <editor> misc xdm <pkgtool> <package> |
Variable state information Editor backup files and state Miscellaneous state data X display manager variable data Packaging support files State data for packages and subsystems |
Tree 5.11.1
This hierarchy holds state information pertaining to an application or the system. State information is data that programs modify while they run, and that pertains to one specific host. Users should never need to modify files in /var/state to configure a package's operation.
State information is generally used to preserve the condition of an application (or a group of inter-related applications) between invocations and between different instances of the same application. State information should generally remain valid after a reboot, should not be logging output, and should not be spooled data.
An application (or a group of inter-related applications) should use a subdirectory of /var/state for its data. There is one required subdirectory, /var/state/misc, which is intended for state files that don't need a subdirectory; the other subdirectories should only be present if the application in question is included in the distribution.
/var/state/<name> is the location that should be used for all distribution packaging support. Different distributions may use different names, of course.
Previous releases of this standard used the name /var/lib for this hierarchy. /var/lib is deprecated, but it may be used in parallel with the required /var/state hierarchy, as a transitional measure for application-specific data. Note, however, that this allowance will be removed in a future release of the standard. Alternately, /var/lib may be made a symbolic link to /var/state.
/usr/lib is increasingly used solely for object files or archives of them; this is true of the current BSD UNIX variants as well as current GNU packages. Accordingly, the name /var/lib seemed inappropriate.
BSD uses the name /var/db for a similar directory. This name seemed overly constricting, as it implied a directory structure intended primarily for database (.db) files.