]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-tmpfiles.xml
TODO: Remove Elapsed Time DHCPv6 option as it is done
[thirdparty/systemd.git] / man / systemd-tmpfiles.xml
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">
4
5 <!--
6 This file is part of systemd.
7
8 Copyright 2010 Lennart Poettering
9
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.
14
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.
19
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/>.
22 -->
23
24 <refentry id="systemd-tmpfiles"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
26
27 <refentryinfo>
28 <title>systemd-tmpfiles</title>
29 <productname>systemd</productname>
30
31 <authorgroup>
32 <author>
33 <contrib>Developer</contrib>
34 <firstname>Lennart</firstname>
35 <surname>Poettering</surname>
36 <email>lennart@poettering.net</email>
37 </author>
38 </authorgroup>
39 </refentryinfo>
40
41 <refmeta>
42 <refentrytitle>systemd-tmpfiles</refentrytitle>
43 <manvolnum>8</manvolnum>
44 </refmeta>
45
46 <refnamediv>
47 <refname>systemd-tmpfiles</refname>
48 <refname>systemd-tmpfiles-setup.service</refname>
49 <refname>systemd-tmpfiles-setup-dev.service</refname>
50 <refname>systemd-tmpfiles-clean.service</refname>
51 <refname>systemd-tmpfiles-clean.timer</refname>
52 <refpurpose>Creates, deletes and cleans up volatile
53 and temporary files and directories</refpurpose>
54 </refnamediv>
55
56 <refsynopsisdiv>
57 <cmdsynopsis>
58 <command>systemd-tmpfiles</command>
59 <arg choice="opt" rep="repeat">OPTIONS</arg>
60 <arg choice="opt" rep="repeat"><replaceable>CONFIGFILE</replaceable></arg>
61 </cmdsynopsis>
62
63 <para><filename>systemd-tmpfiles-setup.service</filename></para>
64 <para><filename>systemd-tmpfiles-setup-dev.service</filename></para>
65 <para><filename>systemd-tmpfiles-clean.service</filename></para>
66 <para><filename>systemd-tmpfiles-clean.timer</filename></para>
67 </refsynopsisdiv>
68
69 <refsect1>
70 <title>Description</title>
71
72 <para><command>systemd-tmpfiles</command> creates,
73 deletes, and cleans up volatile and temporary files and
74 directories, based on the configuration file format and
75 location specified in
76 <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
77 </para>
78
79 <para>If invoked with no arguments, it applies all
80 directives from all configuration files. If one or
81 more filenames are passed on the command line, only
82 the directives in these files are applied. If only
83 the basename of a configuration file is specified,
84 all configuration directories as specified in
85 <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
86 are searched for a matching file.</para>
87 </refsect1>
88
89 <refsect1>
90 <title>Options</title>
91
92 <para>The following options are understood:</para>
93
94 <variablelist>
95 <varlistentry>
96 <term><option>--create</option></term>
97 <listitem><para>If this option is
98 passed, all files and directories
99 marked with <varname>f</varname>,
100 <varname>F</varname>,
101 <varname>w</varname>,
102 <varname>d</varname>,
103 <varname>D</varname>,
104 <varname>p</varname>,
105 <varname>L</varname>,
106 <varname>c</varname>,
107 <varname>b</varname>,
108 <varname>m</varname> in the
109 configuration files are created or
110 written to. Files and directories
111 marked with <varname>z</varname>,
112 <varname>Z</varname>,
113 <varname>m</varname> have their
114 ownership, access mode and security
115 labels set. </para></listitem>
116 </varlistentry>
117
118 <varlistentry>
119 <term><option>--clean</option></term>
120 <listitem><para>If this option is
121 passed, all files and directories with
122 an age parameter configured will be
123 cleaned up.</para></listitem>
124 </varlistentry>
125
126 <varlistentry>
127 <term><option>--remove</option></term>
128 <listitem><para>If this option is
129 passed, all files and directories
130 marked with <varname>r</varname>,
131 <varname>R</varname> in the
132 configuration files are
133 removed.</para></listitem>
134 </varlistentry>
135 <varlistentry>
136 <term><option>--boot</option></term>
137 <listitem><para>Also execute lines
138 with an exclamation mark.
139 </para></listitem>
140 </varlistentry>
141 <varlistentry>
142 <term><option>--prefix=<replaceable>path</replaceable></option></term>
143 <listitem><para>Only apply rules that
144 apply to paths with the specified
145 prefix. This option can be specified
146 multiple times.</para></listitem>
147 </varlistentry>
148 <varlistentry>
149 <term><option>--exclude-prefix=<replaceable>path</replaceable></option></term>
150 <listitem><para>Ignore rules that
151 apply to paths with the specified
152 prefix. This option can be specified
153 multiple times.</para></listitem>
154 </varlistentry>
155 <varlistentry>
156 <term><option>--root=<replaceable>root</replaceable></option></term>
157 <listitem><para>Takes a directory path
158 as an argument. All paths will be
159 prefixed with the given alternate <replaceable>root</replaceable>
160 path, including config search paths.
161 </para></listitem>
162 </varlistentry>
163
164 <xi:include href="standard-options.xml" xpointer="help" />
165 <xi:include href="standard-options.xml" xpointer="version" />
166 </variablelist>
167
168 <para>It is possible to combine
169 <option>--create</option>, <option>--clean</option>,
170 and <option>--remove</option> in one invocation. For
171 example, during boot the following command line is
172 executed to ensure that all temporary and volatile
173 directories are removed and created according to the
174 configuration file:</para>
175
176 <programlisting>systemd-tmpfiles --remove --create</programlisting>
177
178 </refsect1>
179
180 <refsect1>
181 <title>Exit status</title>
182
183 <para>On success, 0 is returned, a non-zero failure
184 code otherwise.</para>
185 </refsect1>
186
187 <refsect1>
188 <title>See Also</title>
189 <para>
190 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
191 <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
192 </para>
193 </refsect1>
194
195 </refentry>