]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-tmpfiles.xml
man: add link to Open Group Base Specifications
[thirdparty/systemd.git] / man / systemd-tmpfiles.xml
CommitLineData
522d4a49
LP
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
5430f7f2
LP
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
522d4a49
LP
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
5430f7f2 18 Lesser General Public License for more details.
522d4a49 19
5430f7f2 20 You should have received a copy of the GNU Lesser General Public License
522d4a49
LP
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22-->
23
dfdebb1b
ZJS
24<refentry id="systemd-tmpfiles"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
522d4a49
LP
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>
ff5d32c8 48 <refname>systemd-tmpfiles-setup.service</refname>
195f8e36 49 <refname>systemd-tmpfiles-setup-dev.service</refname>
ff5d32c8
LP
50 <refname>systemd-tmpfiles-clean.service</refname>
51 <refname>systemd-tmpfiles-clean.timer</refname>
522d4a49 52 <refpurpose>Creates, deletes and cleans up volatile
34511ca7 53 and temporary files and directories</refpurpose>
522d4a49
LP
54 </refnamediv>
55
56 <refsynopsisdiv>
57 <cmdsynopsis>
ef72c1f0
ZJS
58 <command>systemd-tmpfiles</command>
59 <arg choice="opt" rep="repeat">OPTIONS</arg>
60 <arg choice="opt" rep="repeat"><replaceable>CONFIGFILE</replaceable></arg>
522d4a49 61 </cmdsynopsis>
ff5d32c8
LP
62
63 <para><filename>systemd-tmpfiles-setup.service</filename></para>
195f8e36 64 <para><filename>systemd-tmpfiles-setup-dev.service</filename></para>
ff5d32c8
LP
65 <para><filename>systemd-tmpfiles-clean.service</filename></para>
66 <para><filename>systemd-tmpfiles-clean.timer</filename></para>
522d4a49
LP
67 </refsynopsisdiv>
68
69 <refsect1>
70 <title>Description</title>
71
72 <para><command>systemd-tmpfiles</command> creates,
ef72c1f0 73 deletes, and cleans up volatile and temporary files and
6110885c 74 directories, based on the configuration file format and
ef72c1f0
ZJS
75 location specified in
76 <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
77 </para>
6110885c
KS
78
79 <para>If invoked with no arguments, it applies all
80 directives from all configuration files. If one or
e9dd9f95 81 more filenames are passed on the command line, only
ca2e894b
KS
82 the directives in these files are applied. If only
83 the basename of a configuration file is specified,
ef72c1f0
ZJS
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>
522d4a49
LP
87 </refsect1>
88
89 <refsect1>
90 <title>Options</title>
91
92 <para>The following options are understood:</para>
93
94 <variablelist>
522d4a49
LP
95 <varlistentry>
96 <term><option>--create</option></term>
ef72c1f0
ZJS
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>
522d4a49
LP
116 </varlistentry>
117
118 <varlistentry>
119 <term><option>--clean</option></term>
120 <listitem><para>If this option is
79640424 121 passed, all files and directories with
522d4a49
LP
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
ef72c1f0
ZJS
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>
c4708f13
ZJS
134 </varlistentry>
135 <varlistentry>
81815651 136 <term><option>--boot</option></term>
c4708f13
ZJS
137 <listitem><para>Also execute lines
138 with an exclamation mark.
139 </para></listitem>
522d4a49
LP
140 </varlistentry>
141 <varlistentry>
cf9a4abd 142 <term><option>--prefix=<replaceable>path</replaceable></option></term>
522d4a49
LP
143 <listitem><para>Only apply rules that
144 apply to paths with the specified
a2aced4a
DR
145 prefix. This option can be specified
146 multiple times.</para></listitem>
522d4a49 147 </varlistentry>
5c795114 148 <varlistentry>
cf9a4abd 149 <term><option>--exclude-prefix=<replaceable>path</replaceable></option></term>
5c795114
DR
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>
cf9a4abd
MM
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>
dfdebb1b
ZJS
163
164 <xi:include href="standard-options.xml" xpointer="help" />
165 <xi:include href="standard-options.xml" xpointer="version" />
522d4a49
LP
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
8f28cbcd 173 directories are removed and created according to the
522d4a49
LP
174 configuration file:</para>
175
8b7d2212 176 <programlisting>systemd-tmpfiles --remove --create</programlisting>
522d4a49
LP
177
178 </refsect1>
179
180 <refsect1>
181 <title>Exit status</title>
182
b040723e 183 <para>On success, 0 is returned, a non-zero failure
522d4a49
LP
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>,
265ffa1e 191 <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
522d4a49
LP
192 </para>
193 </refsect1>
194
195</refentry>