]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-tmpfiles.xml
man; document gpt-auto-generator
[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
24<refentry id="systemd-tmpfiles">
25
26 <refentryinfo>
27 <title>systemd-tmpfiles</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd-tmpfiles</refentrytitle>
42 <manvolnum>8</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd-tmpfiles</refname>
ff5d32c8 47 <refname>systemd-tmpfiles-setup.service</refname>
195f8e36 48 <refname>systemd-tmpfiles-setup-dev.service</refname>
ff5d32c8
LP
49 <refname>systemd-tmpfiles-clean.service</refname>
50 <refname>systemd-tmpfiles-clean.timer</refname>
522d4a49 51 <refpurpose>Creates, deletes and cleans up volatile
34511ca7 52 and temporary files and directories</refpurpose>
522d4a49
LP
53 </refnamediv>
54
55 <refsynopsisdiv>
56 <cmdsynopsis>
57 <command>systemd-tmpfiles <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">CONFIGURATION FILE</arg></command>
58 </cmdsynopsis>
ff5d32c8
LP
59
60 <para><filename>systemd-tmpfiles-setup.service</filename></para>
195f8e36 61 <para><filename>systemd-tmpfiles-setup-dev.service</filename></para>
ff5d32c8
LP
62 <para><filename>systemd-tmpfiles-clean.service</filename></para>
63 <para><filename>systemd-tmpfiles-clean.timer</filename></para>
522d4a49
LP
64 </refsynopsisdiv>
65
66 <refsect1>
67 <title>Description</title>
68
69 <para><command>systemd-tmpfiles</command> creates,
4e7f8bc8 70 deletes and cleans up volatile and temporary files and
6110885c
KS
71 directories, based on the configuration file format and
72 location specified in <citerefentry>
73 <refentrytitle>tmpfiles.d</refentrytitle>
74 <manvolnum>5</manvolnum>
75 </citerefentry>.</para>
76
77 <para>If invoked with no arguments, it applies all
78 directives from all configuration files. If one or
e9dd9f95 79 more filenames are passed on the command line, only
ca2e894b
KS
80 the directives in these files are applied. If only
81 the basename of a configuration file is specified,
82 all configuration directories as specified in <citerefentry>
83 <refentrytitle>tmpfiles.d</refentrytitle>
84 <manvolnum>5</manvolnum>
85 </citerefentry> are searched for a matching file.</para>
522d4a49
LP
86 </refsect1>
87
88 <refsect1>
89 <title>Options</title>
90
91 <para>The following options are understood:</para>
92
93 <variablelist>
94
95 <varlistentry>
96 <term><option>--create</option></term>
97 <listitem><para>If this option is passed all
98 files and directories marked with f,
99 F, d, D in the configuration files are
777b87e7
MS
100 created. Files and directories marked with z,
101 Z have their ownership, access mode and security
062e01bb 102 labels set.</para></listitem>
522d4a49
LP
103 </varlistentry>
104
105 <varlistentry>
106 <term><option>--clean</option></term>
107 <listitem><para>If this option is
108 passed all files and directories with
109 an age parameter configured will be
110 cleaned up.</para></listitem>
111 </varlistentry>
112
113 <varlistentry>
114 <term><option>--remove</option></term>
115 <listitem><para>If this option is
116 passed all files and directories marked
117 with r, R in the configuration files
118 are removed.</para></listitem>
119 </varlistentry>
120 <varlistentry>
121 <term><option>--prefix=PATH</option></term>
122 <listitem><para>Only apply rules that
123 apply to paths with the specified
a2aced4a
DR
124 prefix. This option can be specified
125 multiple times.</para></listitem>
522d4a49 126 </varlistentry>
5c795114
DR
127 <varlistentry>
128 <term><option>--exclude-prefix=PATH</option></term>
129 <listitem><para>Ignore rules that
130 apply to paths with the specified
131 prefix. This option can be specified
132 multiple times.</para></listitem>
133 </varlistentry>
522d4a49
LP
134
135
136 <varlistentry>
137 <term><option>--help</option></term>
138
139 <listitem><para>Prints a short help
140 text and exits.</para></listitem>
141 </varlistentry>
142
143 </variablelist>
144
145 <para>It is possible to combine
146 <option>--create</option>, <option>--clean</option>,
147 and <option>--remove</option> in one invocation. For
148 example, during boot the following command line is
149 executed to ensure that all temporary and volatile
8f28cbcd 150 directories are removed and created according to the
522d4a49
LP
151 configuration file:</para>
152
8b7d2212 153 <programlisting>systemd-tmpfiles --remove --create</programlisting>
522d4a49
LP
154
155 </refsect1>
156
157 <refsect1>
158 <title>Exit status</title>
159
160 <para>On success 0 is returned, a non-zero failure
161 code otherwise.</para>
162 </refsect1>
163
164 <refsect1>
165 <title>See Also</title>
166 <para>
167 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
168 <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
522d4a49
LP
169 </para>
170 </refsect1>
171
172</refentry>