]>
Commit | Line | Data |
---|---|---|
663996b3 MS |
1 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-tmpfiles</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style> |
2 | a.headerlink { | |
3 | color: #c60f0f; | |
4 | font-size: 0.8em; | |
5 | padding: 0 4px 0 4px; | |
6 | text-decoration: none; | |
7 | visibility: hidden; | |
8 | } | |
9 | ||
10 | a.headerlink:hover { | |
11 | background-color: #c60f0f; | |
12 | color: white; | |
13 | } | |
14 | ||
15 | h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { | |
16 | visibility: visible; | |
17 | } | |
18 | </style><a href="index.html">Index </a>· | |
19 | <a href="systemd.directives.html">Directives </a>· | |
20 | <a href="../python-systemd/index.html">Python </a>· | |
21 | <a href="../libudev/index.html">libudev </a>· | |
e735f4d4 MP |
22 | <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="systemd-tmpfiles"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-clean.timer — Creates, deletes and cleans up volatile |
23 | and temporary files and directories</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-tmpfiles</code> [OPTIONS...] [<em class="replaceable"><code>CONFIGFILE</code></em>...]</p></div><p><code class="filename">systemd-tmpfiles-setup.service</code></p><p><code class="filename">systemd-tmpfiles-setup-dev.service</code></p><p><code class="filename">systemd-tmpfiles-clean.service</code></p><p><code class="filename">systemd-tmpfiles-clean.timer</code></p></div><div class="refsect1"><a name="idm139825960537696"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> creates, deletes, and | |
24 | cleans up volatile and temporary files and directories, based on | |
25 | the configuration file format and location specified in | |
26 | <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>. | |
27 | </p><p>If invoked with no arguments, it applies all directives from | |
28 | all configuration files. If one or more filenames are passed on | |
29 | the command line, only the directives in these files are applied. | |
30 | If only the basename of a configuration file is specified, all | |
31 | configuration directories as specified in | |
32 | <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> | |
33 | are searched for a matching file.</p></div><div class="refsect1"><a name="idm139825960533328"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--create"><span class="term"><code class="option">--create</code></span><a class="headerlink" title="Permalink to this term" href="#--create">¶</a></dt><dd><p>If this option is passed, all files and | |
34 | directories marked with | |
35 | <code class="varname">f</code>, | |
36 | <code class="varname">F</code>, | |
37 | <code class="varname">w</code>, | |
38 | <code class="varname">d</code>, | |
39 | <code class="varname">D</code>, | |
40 | <code class="varname">v</code>, | |
41 | <code class="varname">p</code>, | |
42 | <code class="varname">L</code>, | |
43 | <code class="varname">c</code>, | |
44 | <code class="varname">b</code>, | |
45 | <code class="varname">m</code> | |
46 | in the configuration files are created or written to. Files | |
47 | and directories marked with | |
48 | <code class="varname">z</code>, | |
49 | <code class="varname">Z</code>, | |
50 | <code class="varname">t</code>, | |
51 | <code class="varname">T</code>, | |
52 | <code class="varname">a</code>, and | |
53 | <code class="varname">A</code> have their ownership, access mode and | |
54 | security labels set. </p></dd><dt id="--clean"><span class="term"><code class="option">--clean</code></span><a class="headerlink" title="Permalink to this term" href="#--clean">¶</a></dt><dd><p>If this option is passed, all files and | |
55 | directories with an age parameter configured will be cleaned | |
56 | up.</p></dd><dt id="--remove"><span class="term"><code class="option">--remove</code></span><a class="headerlink" title="Permalink to this term" href="#--remove">¶</a></dt><dd><p>If this option is passed, the contents of | |
57 | directories marked with <code class="varname">D</code> or | |
58 | <code class="varname">R</code>, and files or directories themselves | |
59 | marked with <code class="varname">r</code> or <code class="varname">R</code> are | |
60 | removed.</p></dd><dt id="--boot"><span class="term"><code class="option">--boot</code></span><a class="headerlink" title="Permalink to this term" href="#--boot">¶</a></dt><dd><p>Also execute lines with an exclamation mark. | |
61 | </p></dd><dt id="--prefix=path"><span class="term"><code class="option">--prefix=<em class="replaceable"><code>path</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--prefix=path">¶</a></dt><dd><p>Only apply rules with paths that start with | |
62 | the specified prefix. This option can be specified multiple | |
63 | times.</p></dd><dt id="--exclude-prefix=path"><span class="term"><code class="option">--exclude-prefix=<em class="replaceable"><code>path</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--exclude-prefix=path">¶</a></dt><dd><p>Ignore rules with paths that start with the | |
64 | specified prefix. This option can be specified multiple | |
65 | times.</p></dd><dt id="--root=root"><span class="term"><code class="option">--root=<em class="replaceable"><code>root</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=root">¶</a></dt><dd><p>Takes a directory path as an argument. All | |
66 | paths will be prefixed with the given alternate | |
67 | <em class="replaceable"><code>root</code></em> path, including config search | |
68 | paths. </p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit. | |
69 | </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div><p>It is possible to combine <code class="option">--create</code>, | |
70 | <code class="option">--clean</code>, and <code class="option">--remove</code> in one | |
71 | invocation. For example, during boot the following command line is | |
72 | executed to ensure that all temporary and volatile directories are | |
73 | removed and created according to the configuration file:</p><pre class="programlisting">systemd-tmpfiles --remove --create</pre></div><div class="refsect1"><a name="idm139825964401472"></a><h2 id="Unprivileged --cleanup operation">Unprivileged --cleanup operation<a class="headerlink" title="Permalink to this headline" href="#Unprivileged%20--cleanup%20operation">¶</a></h2><p><span class="command"><strong>systemd-tmpfiles</strong></span> tries to avoid changing | |
74 | the access and modification times on the directories it accesses, | |
75 | which requires <code class="constant">CAP_ADMIN</code> privileges. When | |
76 | running as non-root, directories which are checked for files to | |
77 | clean up will have their access time bumped, which might prevent | |
78 | their cleanup. | |
79 | </p></div><div class="refsect1"><a name="idm139825964398976"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure code | |
80 | otherwise.</p></div><div class="refsect1"><a name="idm139825964397792"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p> | |
81 | <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, | |
82 | <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> | |
83 | </p></div></div></body></html> |