]>
Commit | Line | Data |
---|---|---|
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> | |
ef72c1f0 ZJS |
57 | <command>systemd-tmpfiles</command> |
58 | <arg choice="opt" rep="repeat">OPTIONS</arg> | |
59 | <arg choice="opt" rep="repeat"><replaceable>CONFIGFILE</replaceable></arg> | |
522d4a49 | 60 | </cmdsynopsis> |
ff5d32c8 LP |
61 | |
62 | <para><filename>systemd-tmpfiles-setup.service</filename></para> | |
195f8e36 | 63 | <para><filename>systemd-tmpfiles-setup-dev.service</filename></para> |
ff5d32c8 LP |
64 | <para><filename>systemd-tmpfiles-clean.service</filename></para> |
65 | <para><filename>systemd-tmpfiles-clean.timer</filename></para> | |
522d4a49 LP |
66 | </refsynopsisdiv> |
67 | ||
68 | <refsect1> | |
69 | <title>Description</title> | |
70 | ||
71 | <para><command>systemd-tmpfiles</command> creates, | |
ef72c1f0 | 72 | deletes, and cleans up volatile and temporary files and |
6110885c | 73 | directories, based on the configuration file format and |
ef72c1f0 ZJS |
74 | location specified in |
75 | <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
76 | </para> | |
6110885c KS |
77 | |
78 | <para>If invoked with no arguments, it applies all | |
79 | directives from all configuration files. If one or | |
e9dd9f95 | 80 | more filenames are passed on the command line, only |
ca2e894b KS |
81 | the directives in these files are applied. If only |
82 | the basename of a configuration file is specified, | |
ef72c1f0 ZJS |
83 | all configuration directories as specified in |
84 | <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
85 | 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> | |
eb9da376 LP |
94 | <varlistentry> |
95 | <term><option>-h</option></term> | |
96 | <term><option>--help</option></term> | |
97 | ||
98 | <listitem><para>Prints a short help | |
99 | text and exits.</para></listitem> | |
100 | </varlistentry> | |
101 | ||
102 | <varlistentry> | |
103 | <term><option>--version</option></term> | |
104 | ||
105 | <listitem><para>Prints a short version | |
106 | string and exits.</para></listitem> | |
107 | </varlistentry> | |
522d4a49 LP |
108 | |
109 | <varlistentry> | |
110 | <term><option>--create</option></term> | |
ef72c1f0 ZJS |
111 | <listitem><para>If this option is |
112 | passed, all files and directories | |
113 | marked with <varname>f</varname>, | |
114 | <varname>F</varname>, | |
115 | <varname>w</varname>, | |
116 | <varname>d</varname>, | |
117 | <varname>D</varname>, | |
118 | <varname>p</varname>, | |
119 | <varname>L</varname>, | |
120 | <varname>c</varname>, | |
121 | <varname>b</varname>, | |
122 | <varname>m</varname> in the | |
123 | configuration files are created or | |
124 | written to. Files and directories | |
125 | marked with <varname>z</varname>, | |
126 | <varname>Z</varname>, | |
127 | <varname>m</varname> have their | |
128 | ownership, access mode and security | |
129 | labels set. </para></listitem> | |
522d4a49 LP |
130 | </varlistentry> |
131 | ||
132 | <varlistentry> | |
133 | <term><option>--clean</option></term> | |
134 | <listitem><para>If this option is | |
79640424 | 135 | passed, all files and directories with |
522d4a49 LP |
136 | an age parameter configured will be |
137 | cleaned up.</para></listitem> | |
138 | </varlistentry> | |
139 | ||
140 | <varlistentry> | |
141 | <term><option>--remove</option></term> | |
142 | <listitem><para>If this option is | |
ef72c1f0 ZJS |
143 | passed, all files and directories |
144 | marked with <varname>r</varname>, | |
145 | <varname>R</varname> in the | |
146 | configuration files are | |
147 | removed.</para></listitem> | |
c4708f13 ZJS |
148 | </varlistentry> |
149 | <varlistentry> | |
81815651 | 150 | <term><option>--boot</option></term> |
c4708f13 ZJS |
151 | <listitem><para>Also execute lines |
152 | with an exclamation mark. | |
153 | </para></listitem> | |
522d4a49 LP |
154 | </varlistentry> |
155 | <varlistentry> | |
156 | <term><option>--prefix=PATH</option></term> | |
157 | <listitem><para>Only apply rules that | |
158 | apply to paths with the specified | |
a2aced4a DR |
159 | prefix. This option can be specified |
160 | multiple times.</para></listitem> | |
522d4a49 | 161 | </varlistentry> |
5c795114 DR |
162 | <varlistentry> |
163 | <term><option>--exclude-prefix=PATH</option></term> | |
164 | <listitem><para>Ignore rules that | |
165 | apply to paths with the specified | |
166 | prefix. This option can be specified | |
167 | multiple times.</para></listitem> | |
168 | </varlistentry> | |
522d4a49 LP |
169 | </variablelist> |
170 | ||
171 | <para>It is possible to combine | |
172 | <option>--create</option>, <option>--clean</option>, | |
173 | and <option>--remove</option> in one invocation. For | |
174 | example, during boot the following command line is | |
175 | executed to ensure that all temporary and volatile | |
8f28cbcd | 176 | directories are removed and created according to the |
522d4a49 LP |
177 | configuration file:</para> |
178 | ||
8b7d2212 | 179 | <programlisting>systemd-tmpfiles --remove --create</programlisting> |
522d4a49 LP |
180 | |
181 | </refsect1> | |
182 | ||
183 | <refsect1> | |
184 | <title>Exit status</title> | |
185 | ||
b040723e | 186 | <para>On success, 0 is returned, a non-zero failure |
522d4a49 LP |
187 | code otherwise.</para> |
188 | </refsect1> | |
189 | ||
190 | <refsect1> | |
191 | <title>See Also</title> | |
192 | <para> | |
193 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
265ffa1e | 194 | <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
522d4a49 LP |
195 | </para> |
196 | </refsect1> | |
197 | ||
198 | </refentry> |