<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Systemd-tmpfiles</id>
	<title>Systemd-tmpfiles - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://leo.leung.xyz/wiki/index.php?action=history&amp;feed=atom&amp;title=Systemd-tmpfiles"/>
	<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Systemd-tmpfiles&amp;action=history"/>
	<updated>2026-10-12T00:27:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Systemd-tmpfiles&amp;diff=7205&amp;oldid=prev</id>
		<title>Leo at 21:06, 17 April 2023</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Systemd-tmpfiles&amp;diff=7205&amp;oldid=prev"/>
		<updated>2023-04-17T21:06:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:06, 17 April 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;systemd-tmpfiles is a systemd subsystem that creates, deletes, and cleans up temporary files and directories on a system. Its main functions are:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;systemd-tmpfiles is a systemd subsystem that creates, deletes, and cleans up temporary files and directories on a system. Its main functions are:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create system directories such as /proc, /sys, /var, /tmp, etc.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Create system directories such as &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;/proc&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;/sys&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;/var&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;/tmp&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt;&lt;/ins&gt;, etc.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Cleanup operations on specific directories such as in /tmp and /var/tmp.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Cleanup operations on specific directories such as in &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;/tmp&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt; &lt;/ins&gt;and &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;code&amp;gt;&lt;/ins&gt;/var/tmp&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Directory cleanups are done using a &amp;lt;code&amp;gt;systemd-tmpfiles-clean&amp;lt;/code&amp;gt; timer and service. On Red Hat based systems, the cleanup timer runs once 15 minutes after startup and also once a day&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Configuration ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Configuration ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-7204:rev-7205:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
	<entry>
		<id>https://leo.leung.xyz/wiki/index.php?title=Systemd-tmpfiles&amp;diff=7204&amp;oldid=prev</id>
		<title>Leo: Created page with &quot;systemd-tmpfiles is a systemd subsystem that creates, deletes, and cleans up temporary files and directories on a system. Its main functions are:  # Create system directories such as /proc, /sys, /var, /tmp, etc. # Cleanup operations on specific directories such as in /tmp and /var/tmp.  == Configuration == To see the current configs, run: &lt;code&gt;systemd-tmpfiles --cat-config&lt;/code&gt;. Configuration files are located in the following directories:  * Default system config fi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://leo.leung.xyz/wiki/index.php?title=Systemd-tmpfiles&amp;diff=7204&amp;oldid=prev"/>
		<updated>2023-04-17T20:46:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;systemd-tmpfiles is a systemd subsystem that creates, deletes, and cleans up temporary files and directories on a system. Its main functions are:  # Create system directories such as /proc, /sys, /var, /tmp, etc. # Cleanup operations on specific directories such as in /tmp and /var/tmp.  == Configuration == To see the current configs, run: &amp;lt;code&amp;gt;systemd-tmpfiles --cat-config&amp;lt;/code&amp;gt;. Configuration files are located in the following directories:  * Default system config fi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;systemd-tmpfiles is a systemd subsystem that creates, deletes, and cleans up temporary files and directories on a system. Its main functions are:&lt;br /&gt;
&lt;br /&gt;
# Create system directories such as /proc, /sys, /var, /tmp, etc.&lt;br /&gt;
# Cleanup operations on specific directories such as in /tmp and /var/tmp.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
To see the current configs, run: &amp;lt;code&amp;gt;systemd-tmpfiles --cat-config&amp;lt;/code&amp;gt;. Configuration files are located in the following directories:&lt;br /&gt;
&lt;br /&gt;
* Default system config files are located in &amp;lt;code&amp;gt;/usr/lib/tmpfiles.d&amp;lt;/code&amp;gt;. &lt;br /&gt;
* Alternatively:  &amp;lt;code&amp;gt;/run/tmpfiles.d/*.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
* Custom configs can be placed in &amp;lt;code&amp;gt;/etc/tmpfiles.d&amp;lt;/code&amp;gt;. Overrides files with the same names in the other locations listed above.&lt;br /&gt;
&lt;br /&gt;
=== Custom config ===&lt;br /&gt;
See the tmpfiles.d man page for a comprehensive overview. I will go over some important bits below.&lt;br /&gt;
&lt;br /&gt;
To add your own configuration, place a file with a &amp;lt;code&amp;gt;.conf&amp;lt;/code&amp;gt; file extention in &amp;lt;code&amp;gt;/etc/tmpfiles.d/&amp;lt;/code&amp;gt;. Each line should contain a single directive for a single path. For example:&lt;br /&gt;
{{Highlight&lt;br /&gt;
| code = #Type Path        Mode UID  GID  Age Argument&lt;br /&gt;
d     /run/user   0755 root root 10d -&lt;br /&gt;
L     /tmp/foobar -    -    -    -   /dev/null&lt;br /&gt;
| lang = text&lt;br /&gt;
}}&lt;br /&gt;
Types that you may frequently use are listed below:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Type&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt;&lt;br /&gt;
|Create a file if it doesn&amp;#039;t exist&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;F&amp;lt;/code&amp;gt;&lt;br /&gt;
|Create a file or truncate it if it exists&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;d&amp;lt;/code&amp;gt;&lt;br /&gt;
|Create a directory&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;c&amp;lt;/code&amp;gt;&lt;br /&gt;
|Create a character device node&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;r&amp;lt;/code&amp;gt;&lt;br /&gt;
|Removes a file or directory if it exists. Does not follow symlinks. Use &amp;#039;R&amp;#039; for recursive removes.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt;&lt;br /&gt;
|Exclude a path during a clean operation&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt;&lt;br /&gt;
|Exclude a path (to a directory) during a clean operation&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;Q&amp;lt;/code&amp;gt;&lt;br /&gt;
|Creates a subvolume (or directory if the underlying filesystem doesn&amp;#039;t support volumes)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;L&amp;lt;/code&amp;gt;&lt;br /&gt;
|Creates a symlink&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!&amp;lt;/code&amp;gt;&lt;br /&gt;
|Exclamation mark &amp;#039;!&amp;#039; denotes that the rule should only execute on system startup.&lt;br /&gt;
|}&lt;br /&gt;
If an age is specified, automatic cleanup of files older than the specified age will be done. Files older than the specified age will be deleted.&lt;/div&gt;</summary>
		<author><name>Leo</name></author>
	</entry>
</feed>