man,units: link up new documentation about temporary directories

This commit is contained in:
Lennart Poettering 2019-02-18 17:48:34 +01:00
parent b04d849085
commit 25f77a4ba2
2 changed files with 33 additions and 36 deletions

View File

@ -128,24 +128,22 @@
<varlistentry> <varlistentry>
<term><filename>/tmp/</filename></term> <term><filename>/tmp/</filename></term>
<listitem><para>The place for small temporary files. This <listitem><para>The place for small temporary files. This directory is usually mounted as a
directory is usually mounted as a <literal>tmpfs</literal> <literal>tmpfs</literal> instance, and should hence not be used for larger files. (Use
instance, and should hence not be used for larger files. (Use <filename>/var/tmp/</filename> for larger files.) Since the directory is accessible to other users of
<filename>/var/tmp/</filename> for larger files.) Since the the system, it is essential that this directory is only written to with the <citerefentry
directory is accessible to other users of the system, it is project='man-pages'><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
essential that this directory is only written to with the <citerefentry
<citerefentry project='man-pages'><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>, project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
<citerefentry project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry> related calls. This directory is usually flushed at boot-up. Also, files that are not accessed within
and related calls. This directory is usually flushed at a certain time are usually automatically deleted. If applications find the environment variable
boot-up. Also, files that are not accessed within a certain <varname>$TMPDIR</varname> set, they should prefer using the directory specified in it over directly
time are usually automatically deleted. If applications find referencing <filename>/tmp/</filename> (see <citerefentry
the environment variable <varname>$TMPDIR</varname> set, they project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> and
should prefer using the directory specified in it over
directly referencing <filename>/tmp/</filename> (see
<citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
and
<ulink url="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03">IEEE <ulink url="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03">IEEE
Std 1003.1</ulink> for details).</para></listitem> Std 1003.1</ulink> for details). For further details about this directory, see <ulink
url="https://systemd.io/TEMPORARY_DIRECTORIES">Using /tmp/ And /var/tmp/
Safely</ulink>.</para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
@ -337,24 +335,22 @@
<varlistentry> <varlistentry>
<term><filename>/var/tmp/</filename></term> <term><filename>/var/tmp/</filename></term>
<listitem><para>The place for larger and persistent temporary <listitem><para>The place for larger and persistent temporary files. In contrast to
files. In contrast to <filename>/tmp/</filename>, this directory <filename>/tmp/</filename>, this directory is usually mounted from a persistent physical file system
is usually mounted from a persistent physical file system and and can thus accept larger files. (Use <filename>/tmp/</filename> for smaller files.) This directory
can thus accept larger files. (Use <filename>/tmp/</filename> is generally not flushed at boot-up, but time-based cleanup of files that have not been accessed for
for smaller files.) This directory is generally not flushed at a certain time is applied. The same security restrictions as with <filename>/tmp/</filename> apply,
boot-up, but time-based cleanup of files that have not been and hence only <citerefentry
accessed for a certain time is applied. The same security project='man-pages'><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
restrictions as with <filename>/tmp/</filename> apply, and <citerefentry
hence only project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry> or
<citerefentry project='man-pages'><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>, similar calls should be used to make use of this directory. If applications find the environment
<citerefentry project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry> variable <varname>$TMPDIR</varname> set, they should prefer using the directory specified in it over
or similar calls should be used to make use of this directory. directly referencing <filename>/var/tmp/</filename> (see <citerefentry
If applications find the environment variable project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
<varname>$TMPDIR</varname> set, they should prefer using the details). For further details about this directory, see <ulink
directory specified in it over directly referencing url="https://systemd.io/TEMPORARY_DIRECTORIES">Using /tmp/ And /var/tmp/
<filename>/var/tmp/</filename> (see Safely</ulink>.</para></listitem>
<citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
for details). </para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>

View File

@ -9,7 +9,8 @@
[Unit] [Unit]
Description=Temporary Directory (/tmp) Description=Temporary Directory (/tmp)
Documentation=man:hier(7) Documentation=https://systemd.io/TEMPORARY_DIRECTORIES
Documentation=man:file-hierarchy(7)
Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
ConditionPathIsSymbolicLink=!/tmp ConditionPathIsSymbolicLink=!/tmp
DefaultDependencies=no DefaultDependencies=no