1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2012 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="systemd-delta"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
28 <title>systemd-delta</title>
29 <productname>systemd</productname>
33 <contrib>Developer</contrib>
34 <firstname>Lennart</firstname>
35 <surname>Poettering</surname>
36 <email>lennart@poettering.net</email>
42 <refentrytitle>systemd-delta</refentrytitle>
43 <manvolnum>1</manvolnum>
47 <refname>systemd-delta</refname>
48 <refpurpose>Find overridden configuration files</refpurpose>
53 <command>systemd-delta</command>
54 <arg choice="opt" rep="repeat">OPTIONS</arg>
55 <arg choice="opt" rep="repeat"><replaceable>PREFIX</replaceable><optional>/<replaceable>SUFFIX</replaceable></optional>|<replaceable>SUFFIX</replaceable></arg>
60 <title>Description</title>
62 <para><command>systemd-delta</command> may be used to
63 identify and compare configuration files that override
64 other configuration files. Files in
65 <filename>/etc</filename> have highest priority, files
66 in <filename>/run</filename> have the second highest
67 priority, ..., files in <filename>/lib</filename> have
68 lowest priority. Files in a directory with higher
69 priority override files with the same name in
70 directories of lower priority. In addition, certain
71 configuration files can have <literal>.d</literal>
72 directories which contain "drop-in" files with
73 configuration snippets which augment the main
74 configuration file. "Drop-in" files can be overriden
75 in the same way by placing files with the same name in
76 a directory of higher priority (except that in case of
77 "drop-in" files, both the "drop-in" file name and the
78 name of the containing directory, which corresponds to
79 the name of the main configuration file, must match).
80 For a fuller explanation, see
81 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
84 <para>The command line argument will be split into a
85 prefix and a suffix. Either is optional. The prefix
86 must be one of the directories containing
87 configuration files (<filename>/etc</filename>,
88 <filename>/run</filename>,
89 <filename>/usr/lib</filename>, ...). If it is given,
90 only overriding files contained in this directory will
91 be shown. Otherwise, all overriding files will be
92 shown. The suffix must be a name of a subdirectory
93 containing configuration files like
94 <filename>tmpfiles.d</filename>,
95 <filename>sysctl.d</filename> or
96 <filename>systemd/system</filename>. If it is given,
97 only configuration files in this subdirectory (across
98 all configuration paths) will be analyzed. Otherwise,
99 all configuration files will be analyzed. If the
100 command line argument is not given at all, all
101 configuration files will be analyzed. See below for
102 some examples.</para>
106 <title>Options</title>
108 <para>The following options are understood:</para>
112 <term><option>-t</option></term>
113 <term><option>--type=</option></term>
115 <listitem><para>When listing the
116 differences, only list those that are
117 asked for. The list itself is a
118 comma-separated list of desired
119 difference types.</para>
121 <para>Recognized types are:
125 <term><varname>masked</varname></term>
127 <listitem><para>Show masked files</para></listitem>
131 <term><varname>equivalent</varname></term>
133 <listitem><para>Show overridden
134 files that while overridden, do
135 not differ in content.</para></listitem>
139 <term><varname>redirected</varname></term>
141 <listitem><para>Show files that
142 are redirected to another.</para></listitem>
146 <term><varname>overridden</varname></term>
148 <listitem><para>Show overridden,
149 and changed files.</para></listitem>
153 <term><varname>extended</varname></term>
155 <listitem><para>Show *.conf files in drop-in
156 directories for units.</para></listitem>
160 <term><varname>unchanged</varname></term>
162 <listitem><para>Show unmodified
163 files too.</para></listitem>
170 <term><option>--diff=</option></term>
172 <listitem><para>When showing modified
173 files, when a file is overridden show a
174 diff as well. This option takes a
175 boolean argument. If omitted, it defaults
176 to <option>true</option>.</para></listitem>
179 <xi:include href="standard-options.xml" xpointer="help" />
180 <xi:include href="standard-options.xml" xpointer="version" />
181 <xi:include href="standard-options.xml" xpointer="no-pager" />
186 <title>Examples</title>
188 <para>To see all local configuration:</para>
189 <programlisting>systemd-delta</programlisting>
191 <para>To see all runtime configuration:</para>
192 <programlisting>systemd-delta /run</programlisting>
194 <para>To see all system unit configuration changes:</para>
195 <programlisting>systemd-delta systemd/system</programlisting>
197 <para>To see all runtime "drop-in" changes for system units:</para>
198 <programlisting>systemd-delta --type=extended /run/systemd/system</programlisting>
202 <title>Exit status</title>
204 <para>On success, 0 is returned, a non-zero failure
205 code otherwise.</para>
209 <title>See Also</title>
211 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
212 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>