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">
27 <title>systemd-delta</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>systemd-delta</refentrytitle>
42 <manvolnum>1</manvolnum>
46 <refname>systemd-delta</refname>
47 <refpurpose>Find overridden configuration files</refpurpose>
52 <command>systemd-delta</command>
53 <arg choice="opt" rep="repeat">OPTIONS</arg>
54 <arg choice="opt" rep="repeat"><replaceable>PREFIX</replaceable><optional>/<replaceable>SUFFIX</replaceable></optional>|<replaceable>SUFFIX</replaceable></arg>
59 <title>Description</title>
61 <para><command>systemd-delta</command> may be used to
62 identify and compare configuration files that override
63 other configuration files. Files in
64 <filename>/etc</filename> have highest priority, files
65 in <filename>/run</filename> have the second highest
66 priority, ..., files in <filename>/lib</filename> have
67 lowest priority. Files in a directory with higher
68 priority override files with the same name in
69 directories of lower priority. In addition, certain
70 configuration files can have <literal>.d</literal>
71 directories which contain "drop-in" files with
72 configuration snippets which augment the main
73 configuration file. "Drop-in" files can be overriden
74 in the same way by placing files with the same name in
75 a directory of higher priority (except that in case of
76 "drop-in" files, both the "drop-in" file name and the
77 name of the containing directory, which corresponds to
78 the name of the main configuration file, must match).
79 For a fuller explanation, see
80 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
83 <para>The command line argument will be split into a
84 prefix and a suffix. Either is optional. The prefix
85 must be one of the directories containing
86 configuration files (<filename>/etc</filename>,
87 <filename>/run</filename>,
88 <filename>/usr/lib</filename>, ...). If it is given,
89 only overriding files contained in this directory will
90 be shown. Otherwise, all overriding files will be
91 shown. The suffix must be a name of a subdirectory
92 containing configuration files like
93 <filename>tmpfiles.d</filename>,
94 <filename>sysctl.d</filename> or
95 <filename>systemd/system</filename>. If it is given,
96 only configuration files in this subdirectory (across
97 all configuration paths) will be analyzed. Otherwise,
98 all configuration files will be analyzed. If the
99 commandline argument is not given at all, all
100 configuration files will be analyzed. See below for
101 some examples.</para>
105 <title>Options</title>
107 <para>The following options are understood:</para>
111 <term><option>-h</option></term>
112 <term><option>--help</option></term>
114 <listitem><para>Prints a short help
115 text and exits.</para></listitem>
119 <term><option>--version</option></term>
121 <listitem><para>Prints a short version
122 string and exits.</para></listitem>
126 <term><option>--no-pager</option></term>
128 <listitem><para>Do not pipe output into a
129 pager.</para></listitem>
133 <term><option>-t</option></term>
134 <term><option>--type=</option></term>
136 <listitem><para>When listing the
137 differences, only list those that are
138 asked for. The list itself is a
139 comma-separated list of desired
140 difference types.</para>
142 <para>Recognized types are:
146 <term><varname>masked</varname></term>
148 <listitem><para>Show masked files</para></listitem>
152 <term><varname>equivalent</varname></term>
154 <listitem><para>Show overridden
155 files that while overridden, do
156 not differ in content.</para></listitem>
160 <term><varname>redirected</varname></term>
162 <listitem><para>Show files that
163 are redirected to another.</para></listitem>
167 <term><varname>overridden</varname></term>
169 <listitem><para>Show overridden,
170 and changed files.</para></listitem>
174 <term><varname>extended</varname></term>
176 <listitem><para>Show *.conf files in drop-in
177 directories for units.</para></listitem>
181 <term><varname>unchanged</varname></term>
183 <listitem><para>Show unmodified
184 files too.</para></listitem>
191 <term><option>--diff=</option></term>
193 <listitem><para>When showing modified
194 files, when a file is overridden show a
195 diff as well. This option takes a
196 boolean argument. If omitted, it defaults
197 to <option>true</option>.</para></listitem>
204 <title>Examples</title>
206 <para>To see all local configuration:</para>
207 <programlisting>systemd-delta</programlisting>
209 <para>To see all runtime configuration:</para>
210 <programlisting>systemd-delta /run</programlisting>
212 <para>To see all system unit configuration changes:</para>
213 <programlisting>systemd-delta systemd/system</programlisting>
215 <para>To see all runtime "drop-in" changes for system units:</para>
216 <programlisting>systemd-delta --type=extended /run/systemd/system</programlisting>
220 <title>Exit status</title>
222 <para>On success, 0 is returned, a non-zero failure
223 code otherwise.</para>
227 <title>See Also</title>
229 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
230 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>