man/tmpfiles.d: rewrite the description of age-by

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-07-27 09:39:39 +02:00
parent d6029680df
commit dab1fe1a8e

View file

@ -550,6 +550,7 @@ w- /proc/sys/vm/swappiness - - - - 10</programlisting></para>
<refsect2> <refsect2>
<title>Age</title> <title>Age</title>
<para>The date field, when set, is used to decide what files to <para>The date field, when set, is used to decide what files to
delete when cleaning. If a file or directory is older than the delete when cleaning. If a file or directory is older than the
current time minus the age field, it is deleted. The field current time minus the age field, it is deleted. The field
@ -582,10 +583,9 @@ w- /proc/sys/vm/swappiness - - - - 10</programlisting></para>
and <varname>X</varname>. If omitted or set to and <varname>X</varname>. If omitted or set to
<literal>-</literal>, no automatic clean-up is done.</para> <literal>-</literal>, no automatic clean-up is done.</para>
<para>If the age field starts with a tilde character <para>If the age field starts with a tilde character <literal>~</literal>, clean-up is only applied to
<literal>~</literal>, the clean-up is only applied to files and files and directories one level inside the directory specified, but not the files and directories
directories one level inside the directory specified, but not immediately inside it.</para>
the files and directories immediately inside it.</para>
<para>The age of a file system entry is determined from its last <para>The age of a file system entry is determined from its last
modification timestamp (mtime), its last access timestamp (atime), modification timestamp (mtime), its last access timestamp (atime),
@ -595,30 +595,25 @@ w- /proc/sys/vm/swappiness - - - - 10</programlisting></para>
the age field. To restrict the deletion based on particular type the age field. To restrict the deletion based on particular type
of file timestamps, the age-by argument can be used.</para> of file timestamps, the age-by argument can be used.</para>
<para>The age-by argument, when (optionally) specified along <para>The age-by argument overrides the timestamp types to be used for the age check. It can be
with age will check if the file system entry has aged by the specified by prefixing the age argument with a sequence of characters to specify the timestamp types
type of file timestamp(s) provided. It can be specified by and a colon (<literal>:</literal>):
prefixing the age argument with a set of file timestamp types <literal><replaceable>age-by</replaceable>...:<replaceable>cleanup-age</replaceable></literal>. The
followed by a colon character <literal>:</literal>, i.e., argument can consist of <constant>a</constant> (<constant>A</constant> for directories),
<literal><replaceable>age-by</replaceable>:<replaceable>cleanup-age</replaceable></literal>. <constant>b</constant> (<constant>B</constant> for directories), <constant>c</constant>
The argument can be a set of: (<constant>C</constant> for directories), or <constant>m</constant> (<constant>M</constant> for
<constant>a</constant> (<constant>A</constant> for directories), directories). Those respectively indicate access, creation, last status change, and last modification
<constant>b</constant> (<constant>B</constant> for directories), time of a file system entry. The lower-case letter signifies that the given timestamp type should be
<constant>c</constant> (<constant>C</constant> for directories; ignored by default), or considered for files, while the upper-case letter signifies that the given timestamp type should be
<constant>m</constant> (<constant>M</constant> for directories), considered for directories. See <citerefentry
indicating access, creation, last status change, and last project='man-pages'><refentrytitle>statx</refentrytitle><manvolnum>2</manvolnum></citerefentry> file
modification times of a file system entry respectively. See timestamp fields for more details about timestamp types.</para>
<citerefentry project='man-pages'><refentrytitle>statx</refentrytitle><manvolnum>2</manvolnum></citerefentry>
file timestamp fields for more details.</para>
<para>If unspecified, the age-by field defaults to <para>If not specified, the age-by field defaults to <constant>abcmABM</constant>, i.e. by default all
<constant>abcmABM</constant>, file timestamps are taken into consideration, with the exception of the last status change timestamp
i.e., by default all file timestamps are taken into consideration, (ctime) for directories. This is because the aging logic itself will alter the ctime whenever it
with the exception of the last status change timestamp (ctime) for deletes a file inside it. To ensure that running the aging logic does not feed back into the next
directories. This is because the aging logic itself will alter the iteration of itself, ctime for directories is ignored by default.</para>
ctime whenever it deletes a file inside it. To ensure that running
the aging logic does not feed back into the next iteration of it,
ctime for directories is ignored by default.</para>
<para>For example:<programlisting> <para>For example:<programlisting>
# Files created and modified, and directories accessed more than # Files created and modified, and directories accessed more than