1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-02 13:47:27 +03:00

man: reindent tmpfiles.d(5)

Reindent to 2 spaces, use more markup.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-01-06 01:58:31 -05:00
parent 42d8fafc4b
commit 302fbdf29e

View File

@ -21,575 +21,483 @@
--> -->
<refentry id="tmpfiles.d"> <refentry id="tmpfiles.d">
<refentryinfo> <refentryinfo>
<title>tmpfiles.d</title> <title>tmpfiles.d</title>
<productname>systemd</productname> <productname>systemd</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Documentation</contrib> <contrib>Documentation</contrib>
<firstname>Brandon</firstname> <firstname>Brandon</firstname>
<surname>Philips</surname> <surname>Philips</surname>
<email>brandon@ifup.org</email> <email>brandon@ifup.org</email>
</author> </author>
</authorgroup> </authorgroup>
</refentryinfo> </refentryinfo>
<refmeta> <refmeta>
<refentrytitle>tmpfiles.d</refentrytitle> <refentrytitle>tmpfiles.d</refentrytitle>
<manvolnum>5</manvolnum> <manvolnum>5</manvolnum>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>tmpfiles.d</refname> <refname>tmpfiles.d</refname>
<refpurpose>Configuration for creation, deletion and <refpurpose>Configuration for creation, deletion and cleaning of
cleaning of volatile and temporary files</refpurpose> volatile and temporary files</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
<para><filename>/etc/tmpfiles.d/*.conf</filename></para> <para><filename>/etc/tmpfiles.d/*.conf</filename></para>
<para><filename>/run/tmpfiles.d/*.conf</filename></para> <para><filename>/run/tmpfiles.d/*.conf</filename></para>
<para><filename>/usr/lib/tmpfiles.d/*.conf</filename></para> <para><filename>/usr/lib/tmpfiles.d/*.conf</filename></para>
</refsynopsisdiv> </refsynopsisdiv>
<refsect1> <refsect1>
<title>Description</title> <title>Description</title>
<para><command>systemd-tmpfiles</command> uses the <para><command>systemd-tmpfiles</command> uses the configuration
configuration files from the above directories to describe the files from the above directories to describe the creation,
creation, cleaning and removal of volatile and cleaning and removal of volatile and temporary files and
temporary files and directories which usually reside directories which usually reside in directories such as
in directories such as <filename>/run</filename> <filename>/run</filename> or <filename>/tmp</filename>.</para>
or <filename>/tmp</filename>.</para>
<para>Volatile and temporary files and directories are <para>Volatile and temporary files and directories are those
those located in <filename>/run</filename> (and its located in <filename>/run</filename> (and its alias
alias <filename>/var/run</filename>), <filename>/var/run</filename>), <filename>/tmp</filename>,
<filename>/tmp</filename>, <filename>/var/tmp</filename>, the API file systems such as
<filename>/var/tmp</filename>, the API file systems <filename>/sys</filename> or <filename>/proc</filename>, as well
such as <filename>/sys</filename> or as some other directories below <filename>/var</filename>.</para>
<filename>/proc</filename>, as well as some other
directories below <filename>/var</filename>.</para>
<para>System daemons frequently require private <para>System daemons frequently require private runtime
runtime directories below <filename>/run</filename> to directories below <filename>/run</filename> to place communication
place communication sockets and similar in. For these, sockets and similar in. For these, consider declaring them in
consider declaring them in their unit files using their unit files using <varname>RuntimeDirectory=</varname> (see
<varname>RuntimeDirectory=</varname> <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
(see <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details), for details), if this is feasible.</para>
if this is feasible.</para> </refsect1>
</refsect1>
<refsect1> <refsect1>
<title>Configuration Format</title> <title>Configuration Format</title>
<para>Each configuration file shall be named in the <para>Each configuration file shall be named in the style of
style of <filename><replaceable>package</replaceable>.conf</filename> or
<filename><replaceable>package</replaceable>.conf</filename> <filename><replaceable>package</replaceable>-<replaceable>part</replaceable>.conf</filename>.
or The second variant should be used when it is desirable to make it
<filename><replaceable>package</replaceable>-<replaceable>part</replaceable>.conf</filename>. easy to override just this part of configuration.</para>
The second variant should be used when it is desirable
to make it easy to override just this part of
configuration.</para>
<para>Files in <filename>/etc/tmpfiles.d</filename> <para>Files in <filename>/etc/tmpfiles.d</filename> override files
override files with the same name in with the same name in <filename>/usr/lib/tmpfiles.d</filename> and
<filename>/usr/lib/tmpfiles.d</filename> and <filename>/run/tmpfiles.d</filename>. Files in
<filename>/run/tmpfiles.d</filename>. Files in <filename>/run/tmpfiles.d</filename> override files with the same
<filename>/run/tmpfiles.d</filename> override files name in <filename>/usr/lib/tmpfiles.d</filename>. Packages should
with the same name in install their configuration files in
<filename>/usr/lib/tmpfiles.d</filename>. Packages <filename>/usr/lib/tmpfiles.d</filename>. Files in
should install their configuration files in <filename>/etc/tmpfiles.d</filename> are reserved for the local
<filename>/usr/lib/tmpfiles.d</filename>. Files in administrator, who may use this logic to override the
<filename>/etc/tmpfiles.d</filename> are reserved for configuration files installed by vendor packages. All
the local administrator, who may use this logic to configuration files are sorted by their filename in lexicographic
override the configuration files installed by vendor order, regardless of which of the directories they reside in. If
packages. All configuration files are sorted by their multiple files specify the same path, the entry in the file with
filename in lexicographic order, regardless of which the lexicographically earliest name will be applied. All other
of the directories they reside in. If multiple files conflicting entries will be logged as errors. When two lines are
specify the same path, the entry in the file with the prefix and suffix of each other, then the prefix is always
lexicographically earliest name will be applied. processed first, the suffix later. Otherwise, the
All other conflicting entries will be logged as files/directories are processed in the order they are
errors. When two lines are prefix and suffix of each listed.</para>
other, then the prefix is always processed first, the
suffix later. Otherwise, the files/directories are
processed in the order they are listed.</para>
<para>If the administrator wants to disable a <para>If the administrator wants to disable a configuration file
configuration file supplied by the vendor, the supplied by the vendor, the recommended way is to place a symlink
recommended way is to place a symlink to to <filename>/dev/null</filename> in
<filename>/dev/null</filename> in <filename>/etc/tmpfiles.d/</filename> bearing the same filename.
<filename>/etc/tmpfiles.d/</filename> bearing the </para>
same filename.</para>
<para>The configuration format is one line per path <para>The configuration format is one line per path containing
containing type, path, mode, ownership, age, and argument type, path, mode, ownership, age, and argument fields:</para>
fields:</para>
<programlisting>#Type Path Mode UID GID Age Argument <programlisting>#Type Path Mode UID GID Age Argument
d /run/user 0755 root root 10d - d /run/user 0755 root root 10d -
L /tmp/foobar - - - - /dev/null</programlisting> L /tmp/foobar - - - - /dev/null</programlisting>
<refsect2> <refsect2>
<title>Type</title> <title>Type</title>
<para>The type consists of a single letter and <para>The type consists of a single letter and optionally an
optionally an exclamation mark.</para> exclamation mark.</para>
<para>The following line types are understood:</para> <para>The following line types are understood:</para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><varname>f</varname></term> <term><varname>f</varname></term>
<listitem><para>Create a file if it does not exist yet. If the argument parameter is given, it will be written to the file.</para></listitem> <listitem><para>Create a file if it does not exist yet. If
</varlistentry> the argument parameter is given, it will be written to the
file.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>F</varname></term> <term><varname>F</varname></term>
<listitem><para>Create or truncate a file. If the argument parameter is given, it will be written to the file.</para></listitem> <listitem><para>Create or truncate a file. If the argument
</varlistentry> parameter is given, it will be written to the file.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>w</varname></term> <term><varname>w</varname></term>
<listitem><para>Write the argument parameter to a file, if the file exists. <listitem><para>Write the argument parameter to a file, if
Lines of this type accept shell-style globs in place of normal path the file exists. Lines of this type accept shell-style
names. The argument parameter will be written without a trailing globs in place of normal path names. The argument parameter
newline. C-style backslash escapes are interpreted.</para></listitem> will be written without a trailing newline. C-style
</varlistentry> backslash escapes are interpreted.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>d</varname></term> <term><varname>d</varname></term>
<listitem><para>Create a directory if it does not exist yet.</para></listitem> <listitem><para>Create a directory if it does not exist yet.
</varlistentry> </para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>D</varname></term> <term><varname>D</varname></term>
<listitem><para>Create or empty a directory.</para></listitem> <listitem><para>Create or empty a directory.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><varname>v</varname></term> <term><varname>v</varname></term>
<listitem><para>Create a <listitem><para>Create a subvolume if the path does not
subvolume if the path does not exist yet and the file system supports this
exist yet and the file system (btrfs). Otherwise create a normal directory, in the same
supports this (btrfs). Otherwise way as <varname>d</varname>.</para></listitem>
create a normal directory, in </varlistentry>
the same way as
<varname>d</varname>.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>p</varname></term> <term><varname>p</varname></term>
<term><varname>p+</varname></term> <term><varname>p+</varname></term>
<listitem><para>Create a named <listitem><para>Create a named pipe (FIFO) if it does not
pipe (FIFO) if it does not exist yet. If suffixed with <varname>+</varname> and a file
exist yet. If suffixed with already exists where the pipe is to be created, it will be
<varname>+</varname> and a removed and be replaced by the pipe.</para></listitem>
file already exists where the </varlistentry>
pipe is to be created, it will
be removed and be replaced by
the pipe.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>L</varname></term> <term><varname>L</varname></term>
<term><varname>L+</varname></term> <term><varname>L+</varname></term>
<listitem><para>Create a <listitem><para>Create a symlink if it does not exist
symlink if it does not exist yet. If suffixed with <varname>+</varname> and a file
yet. If suffixed with already exists where the symlink is to be created, it will
<varname>+</varname> and a be removed and be replaced by the symlink. If the argument
file already exists where the is omitted, symlinks to files with the same name residing in
symlink is to be created, it the directory <filename>/usr/share/factory/</filename> are
will be removed and be created.</para></listitem>
replaced by the </varlistentry>
symlink. If the argument is omitted,
symlinks to files with the same name
residing in the directory
<filename>/usr/share/factory/</filename>
are created.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>c</varname></term> <term><varname>c</varname></term>
<term><varname>c+</varname></term> <term><varname>c+</varname></term>
<listitem><para>Create a <listitem><para>Create a character device node if it does
character device node if it not exist yet. If suffixed with <varname>+</varname> and a
does not exist yet. If file already exists where the device node is to be created,
suffixed with it will be removed and be replaced by the device node. It is
<varname>+</varname> and a recommended to suffix this entry with an exclamation mark to
file already exists where the only create static device nodes at boot, as udev will not
device node is to be created, manage static device nodes that are created at runtime.
it will be removed and be </para></listitem>
replaced by the device </varlistentry>
node. It is recommended to suffix this
entry with an exclamation mark to only
create static device nodes at boot,
as udev will not manage static device
nodes that are created at runtime.
</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>b</varname></term> <term><varname>b</varname></term>
<term><varname>b+</varname></term> <term><varname>b+</varname></term>
<listitem><para>Create a block <listitem><para>Create a block device node if it does not
device node if it does not exist yet. If suffixed with <varname>+</varname> and a file
exist yet. If suffixed with already exists where the device node is to be created, it
<varname>+</varname> and a will be removed and be replaced by the device node. It is
file already exists where the recommended to suffix this entry with an exclamation mark to
device node is to be created, only create static device nodes at boot, as udev will not
it will be removed and be manage static device nodes that are created at runtime.
replaced by the device </para></listitem>
node. It is recommended to suffix this </varlistentry>
entry with an exclamation mark to only
create static device nodes at boot,
as udev will not manage static device
nodes that are created at runtime.
</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>C</varname></term> <term><varname>C</varname></term>
<listitem><para>Recursively <listitem><para>Recursively copy a file or directory, if the
copy a file or directory, if destination files or directories do not exist yet. Note that
the destination files or this command will not descend into subdirectories if the
directories do not exist destination directory already exists. Instead, the entire
yet. Note that this command copy operation is skipped. If the argument is omitted, files
will not descend into from the source directory
subdirectories if the <filename>/usr/share/factory/</filename> with the same name
destination directory already are copied.</para></listitem>
exists. Instead, the entire </varlistentry>
copy operation is
skipped. If the argument is omitted,
files from the source directory
<filename>/usr/share/factory/</filename>
with the same name are copied.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>x</varname></term> <term><varname>x</varname></term>
<listitem><para>Ignore a path <listitem><para>Ignore a path during cleaning. Use this type
during cleaning. Use this type to exclude paths from clean-up as controlled with the Age
to exclude paths from clean-up parameter. Note that lines of this type do not influence the
as controlled with the Age effect of <varname>r</varname> or <varname>R</varname>
parameter. Note that lines of lines. Lines of this type accept shell-style globs in place
this type do not influence the of normal path names. </para></listitem>
effect of <varname>r</varname> </varlistentry>
or <varname>R</varname> lines.
Lines of this type accept
shell-style globs in place of
normal path names.
</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>X</varname></term> <term><varname>X</varname></term>
<listitem><para>Ignore a path <listitem><para>Ignore a path during cleaning. Use this type
during cleaning. Use this type to exclude paths from clean-up as controlled with the Age
to exclude paths from clean-up parameter. Unlike <varname>x</varname>, this parameter will
as controlled with the Age not exclude the content if path is a directory, but only
parameter. Unlike directory itself. Note that lines of this type do not
<varname>x</varname>, this influence the effect of <varname>r</varname> or
parameter will not exclude the <varname>R</varname> lines. Lines of this type accept
content if path is a shell-style globs in place of normal path names.
directory, but only directory </para></listitem>
itself. Note that lines of </varlistentry>
this type do not influence the
effect of <varname>r</varname>
or <varname>R</varname> lines.
Lines of this type accept
shell-style globs in place of
normal path names.
</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>r</varname></term> <term><varname>r</varname></term>
<listitem><para>Remove a file <listitem><para>Remove a file or directory if it exists.
or directory if it exists. This may not be used to remove non-empty directories, use
This may not be used to remove <varname>R</varname> for that. Lines of this type accept
non-empty directories, use shell-style globs in place of normal path
<varname>R</varname> for that. names.</para></listitem>
Lines of this type accept </varlistentry>
shell-style globs in place of
normal path
names.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>R</varname></term> <term><varname>R</varname></term>
<listitem><para>Recursively <listitem><para>Recursively remove a path and all its
remove a path and all its subdirectories (if it is a directory). Lines of this type
subdirectories (if it is a accept shell-style globs in place of normal path
directory). Lines of this type names.</para></listitem>
accept shell-style globs in </varlistentry>
place of normal path
names.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>z</varname></term> <term><varname>z</varname></term>
<listitem><para>Adjust the <listitem><para>Adjust the access mode, group and user, and
access mode, group and user, restore the SELinux security context of a file or directory,
and restore the SELinux security if it exists. Lines of this type accept shell-style globs in
context of a file or directory, place of normal path names. </para></listitem>
if it exists. Lines of this </varlistentry>
type accept shell-style globs
in place of normal path names.
</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>Z</varname></term> <term><varname>Z</varname></term>
<listitem><para>Recursively <listitem><para>Recursively set the access mode, group and
set the access mode, group and user, and restore the SELinux security context of a file or
user, and restore the SELinux directory if it exists, as well as of its subdirectories and
security context of a file or the files contained therein (if applicable). Lines of this
directory if it exists, as type accept shell-style globs in place of normal path names.
well as of its subdirectories </para></listitem>
and the files contained </varlistentry>
therein (if applicable). Lines
of this type accept
shell-style globs in place of
normal path
names.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>t</varname></term> <term><varname>t</varname></term>
<listitem><para>Set extended <listitem><para>Set extended attributes on item. It may be
attributes on item. It may be used in conjunction with other types (only
used in conjunction with other <varname>d</varname>, <varname>D</varname>,
types (only <varname>d</varname>, <varname>f</varname>, <varname>F</varname>,
<varname>D</varname>, <varname>f</varname>, <varname>L</varname>, <varname>p</varname>,
<varname>F</varname>, <varname>L</varname>, <varname>c</varname>, <varname>b</varname>, makes sense).
<varname>p</varname>, <varname>c</varname>, If used as a standalone line, then
<varname>b</varname>, makes sense). <command>systemd-tmpfiles</command> will try to set extended
If used as a standalone line, then attributes on specified path. This can be especially used
<command>systemd-tmpfiles</command> to set SMACK labels. </para></listitem>
will try to set extended </varlistentry>
attributes on specified path. </variablelist>
This can be especially used to set
SMACK labels.
</para></listitem>
</varlistentry>
</variablelist>
<para>If the exclamation mark is used, this <para>If the exclamation mark is used, this line is only safe of
line is only safe of execute during boot, and execute during boot, and can break a running system. Lines
can break a running system. Lines without the without the exclamation mark are presumed to be safe to execute
exclamation mark are presumed to be safe to at any time, e.g. on package upgrades.
execute at any time, e.g. on package upgrades. <command>systemd-tmpfiles</command> will execute line with an
<command>systemd-tmpfiles</command> will exclamation mark only if option <option>--boot</option> is
execute line with an exclamation mark only if given.</para>
option <option>--boot</option> is given.
</para>
<para>For example: <para>For example:
<programlisting># Make sure these are created by default so that nobody else can <programlisting># Make sure these are created by default so that nobody else can
d /tmp/.X11-unix 1777 root root 10d d /tmp/.X11-unix 1777 root root 10d
# Unlink the X11 lock files # Unlink the X11 lock files
r! /tmp/.X[0-9]*-lock</programlisting> r! /tmp/.X[0-9]*-lock</programlisting>
The second line in contrast to the first one The second line in contrast to the first one would break a
would break a running system, and will only be running system, and will only be executed with
executed with <option>--boot</option>.</para> <option>--boot</option>.</para>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Path</title> <title>Path</title>
<para>The file system path specification supports simple specifier <para>The file system path specification supports simple
expansion. The following expansions are specifier expansion. The following expansions are
understood:</para> understood:</para>
<table> <table>
<title>Specifiers available</title> <title>Specifiers available</title>
<tgroup cols='3' align='left' colsep='1' rowsep='1'> <tgroup cols='3' align='left' colsep='1' rowsep='1'>
<colspec colname="spec" /> <colspec colname="spec" />
<colspec colname="mean" /> <colspec colname="mean" />
<colspec colname="detail" /> <colspec colname="detail" />
<thead> <thead>
<row> <row>
<entry>Specifier</entry> <entry>Specifier</entry>
<entry>Meaning</entry> <entry>Meaning</entry>
<entry>Details</entry> <entry>Details</entry>
</row> </row>
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry><literal>%m</literal></entry> <entry><literal>%m</literal></entry>
<entry>Machine ID</entry> <entry>Machine ID</entry>
<entry>The machine ID of the running system, formatted as string. See <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry> <entry>The machine ID of the running system, formatted as string. See <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
</row> </row>
<row> <row>
<entry><literal>%b</literal></entry> <entry><literal>%b</literal></entry>
<entry>Boot ID</entry> <entry>Boot ID</entry>
<entry>The boot ID of the running system, formatted as string. See <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry> for more information.</entry> <entry>The boot ID of the running system, formatted as string. See <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry> for more information.</entry>
</row> </row>
<row> <row>
<entry><literal>%H</literal></entry> <entry><literal>%H</literal></entry>
<entry>Host name</entry> <entry>Host name</entry>
<entry>The hostname of the running system.</entry> <entry>The hostname of the running system.</entry>
</row> </row>
<row> <row>
<entry><literal>%v</literal></entry> <entry><literal>%v</literal></entry>
<entry>Kernel release</entry> <entry>Kernel release</entry>
<entry>Identical to <command>uname -r</command> output.</entry> <entry>Identical to <command>uname -r</command> output.</entry>
</row> </row>
<row> <row>
<entry><literal>%%</literal></entry> <entry><literal>%%</literal></entry>
<entry>Escaped %</entry> <entry>Escaped %</entry>
<entry>Single percent sign.</entry> <entry>Single percent sign.</entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Mode</title> <title>Mode</title>
<para>The file access mode to use when <para>The file access mode to use when creating this file or
creating this file or directory. If omitted or directory. If omitted or when set to <literal>-</literal>, the
when set to -, the default is used: 0755 for default is used: 0755 for directories, 0644 for all other file
directories, 0644 for all other file objects. objects. For <varname>z</varname>, <varname>Z</varname> lines,
For <varname>z</varname>, <varname>Z</varname> if omitted or when set to <literal>-</literal>, the file access
lines, if omitted or when set to mode will not be modified. This parameter is ignored for
<literal>-</literal>, the file access mode <varname>x</varname>, <varname>r</varname>,
will not be modified. This parameter is <varname>R</varname>, <varname>L</varname>, <varname>t</varname>
ignored for <varname>x</varname>, lines.</para>
<varname>r</varname>, <varname>R</varname>,
<varname>L</varname>, <varname>t</varname> lines.</para>
<para>Optionally, if prefixed with <para>Optionally, if prefixed with <literal>~</literal>, the
<literal>~</literal>, the access mode is masked access mode is masked based on the already set access bits for
based on the already set access bits for existing file or directories: if the existing file has all
existing file or directories: if the existing executable bits unset, all executable bits are removed from the
file has all executable bits unset, all new access mode, too. Similarly, if all read bits are removed
executable bits are removed from the new from the old access mode, they will be removed from the new
access mode, too. Similarly, if all read bits access mode too, and if all write bits are removed, they will be
are removed from the old access mode, they will removed from the new access mode too. In addition, the
be removed from the new access mode too, and sticky/SUID/SGID bit is removed unless applied to a
if all write bits are removed, they will be directory. This functionality is particularly useful in
removed from the new access mode too. In conjunction with <varname>Z</varname>.</para>
addition, the sticky/SUID/SGID bit is removed unless </refsect2>
applied to a directory. This
functionality is particularly useful in
conjunction with <varname>Z</varname>.</para>
</refsect2>
<refsect2> <refsect2>
<title>UID, GID</title> <title>UID, GID</title>
<para>The user and group to use for this file <para>The user and group to use for this file or directory. This
or directory. This may either be a numeric may either be a numeric user/group ID or a user or group
user/group ID or a user or group name. If name. If omitted or when set to <literal>-</literal>, the
omitted or when set to <literal>-</literal>, default 0 (root) is used. For <varname>z</varname>,
the default 0 (root) is used. For <varname>Z</varname> lines, when omitted or when set to -, the
<varname>z</varname>, <varname>Z</varname> file ownership will not be modified. These parameters are
lines, when omitted or when set to -, the file ignored for <varname>x</varname>, <varname>r</varname>,
ownership will not be modified. These <varname>R</varname>, <varname>L</varname>, <varname>t</varname>
parameters are ignored for lines.</para>
<varname>x</varname>, <varname>r</varname>, </refsect2>
<varname>R</varname>, <varname>L</varname>,
<varname>t</varname> lines.</para>
</refsect2>
<refsect2> <refsect2>
<title>Age</title> <title>Age</title>
<para>The date field, when set, is used to <para>The date field, when set, is used to decide what files to
decide what files to delete when cleaning. If delete when cleaning. If a file or directory is older than the
a file or directory is older than the current current time minus the age field, it is deleted. The field
time minus the age field, it is deleted. The format is a series of integers each followed by one of the
field format is a series of integers each following postfixes for the respective time units:</para>
followed by one of the following
postfixes for the respective time units:</para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><varname>s</varname></term> <term><varname>s</varname></term>
<term><varname>min</varname></term> <term><varname>min</varname></term>
<term><varname>h</varname></term> <term><varname>h</varname></term>
<term><varname>d</varname></term> <term><varname>d</varname></term>
<term><varname>w</varname></term> <term><varname>w</varname></term>
<term><varname>ms</varname></term> <term><varname>ms</varname></term>
<term><varname>m</varname></term> <term><varname>m</varname></term>
<term><varname>us</varname></term></varlistentry> <term><varname>us</varname></term></varlistentry>
</variablelist> </variablelist>
<para>If multiple integers and units are specified, the time <para>If multiple integers and units are specified, the time
values are summed up. If an integer is given without a unit, values are summed up. If an integer is given without a unit,
s is assumed. <varname>s</varname> is assumed.
</para> </para>
<para>When the age is set to zero, the files are cleaned <para>When the age is set to zero, the files are cleaned
unconditionally.</para> unconditionally.</para>
<para>The age field only applies to lines <para>The age field only applies to lines
starting with <varname>d</varname>, starting with <varname>d</varname>,
<varname>D</varname>, and <varname>D</varname>, and
<varname>x</varname>. If omitted or set to <varname>x</varname>. If omitted or set to
<literal>-</literal>, no automatic clean-up is <literal>-</literal>, no automatic clean-up is
done.</para> done.</para>
<para>If the age field starts with a tilde <para>If the age field starts with a tilde character
character <literal>~</literal>, the clean-up <literal>~</literal>, the clean-up is only applied to files and
is only applied to files and directories one directories one level inside the directory specified, but not
level inside the directory specified, but not the files and directories immediately inside it.</para>
the files and directories immediately inside </refsect2>
it.</para>
</refsect2>
<refsect2> <refsect2>
<title>Argument</title> <title>Argument</title>
<para>For <varname>L</varname> lines <para>For <varname>L</varname> lines determines the destination
determines the destination path of the path of the symlink. For <varname>c</varname>,
symlink. For <varname>c</varname>, <varname>b</varname> determines the major/minor of the device
<varname>b</varname> determines the node, with major and minor formatted as integers, separated by
major/minor of the device node, with major and <literal>:</literal>, e.g. <literal>1:3</literal>. For
minor formatted as integers, separated by <varname>f</varname>, <varname>F</varname>, and
<literal>:</literal>, e.g. <varname>w</varname> may be used to specify a short string that
<literal>1:3</literal>. For is written to the file, suffixed by a newline. For
<varname>f</varname>, <varname>F</varname>, <varname>C</varname>, specifies the source file or
and <varname>w</varname> may be used to directory. For <varname>t</varname> determines extended
specify a short string that is written to the attributes to be set. Ignored for all other lines.</para>
file, suffixed by a newline. For </refsect2>
<varname>C</varname>, specifies the source file
or directory. For <varname>t</varname> determines
extended attributes to be set. Ignored for all other lines.</para>
</refsect2>
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>Example</title> <title>Example</title>
<example> <example>
<title>/etc/tmpfiles.d/screen.conf example</title> <title>/etc/tmpfiles.d/screen.conf example</title>
<para><command>screen</command> needs two directories created at boot with specific modes and ownership.</para> <para><command>screen</command> needs two directories created at
boot with specific modes and ownership.</para>
<programlisting>d /run/screens 1777 root root 10d <programlisting>d /run/screens 1777 root root 10d
d /run/uscreens 0755 root root 10d12h d /run/uscreens 0755 root root 10d12h
t /run/screen - - - - user.name="John Smith" security.SMACK64=screen</programlisting> t /run/screen - - - - user.name="John Smith" security.SMACK64=screen</programlisting>
</example> </example>
<example> <example>
<title>/etc/tmpfiles.d/abrt.conf example</title> <title>/etc/tmpfiles.d/abrt.conf example</title>
<para><command>abrt</command> needs a directory created at boot with specific mode and ownership and its content should be preserved.</para> <para><command>abrt</command> needs a directory created at boot with specific mode and ownership and its content should be preserved.</para>
<programlisting>d /var/tmp/abrt 0755 abrt abrt <programlisting>d /var/tmp/abrt 0755 abrt abrt
x /var/tmp/abrt/*</programlisting> x /var/tmp/abrt/*</programlisting>
</example> </example>
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>
<para> <para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry> <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
</para> </para>
</refsect1> </refsect1>
</refentry> </refentry>