Directory tmpfiles.d: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
(Created page with "== Overview == tmpfiles.d 디렉토리 내용 정리. == Basic == tmpfiles.d 디렉토리의 설정 파일들은 tmpfs 의 임시 파일들을 관리한다. <pre> df -h File...")
 
Line 3: Line 3:


== Basic ==
== Basic ==
tmpfiles.d 디렉토리의 설정 파일들은 tmpfs 의 임시 파일들을 관리한다.
Configuration for creation, deletion and cleaning of volatile and temporary files.
 
tmpfiles.d 디렉토리의 설정 파일들은 tmpfs 및 temporary directory 의 임시 파일들을 관리한다.
<pre>
/etc/tmpfiles.d/*.conf
/run/tmpfiles.d/*.conf
/usr/lib/tmpfiles.d/*.conf
</pre>
 
systemd-tmpfiles uses the configuration files from the above directories to describe the creation, cleaning and removal of volatile and temporary files and directories which usually reside in directories such as /run or /tmp.
 
Volatile and temporary files and directories are those located in /run (and its alias /var/run), /tmp, /var/tmp, the API file systems such as /sys or /proc, as well as some other directories below /var.
 
System daemons frequently require private runtime directories below /run to place communication sockets and similar in. For these, consider declaring them in their unit files using RuntimeDirectory if this is feasible.
<pre>
<pre>
  df -h
  df -h
Line 15: Line 28:
</pre>
</pre>


== Configuration format ==
<pre>
#Type Path        Mode UID  GID  Age Argument
d    /run/user  0755 root root 10d -
L    /tmp/foobar -    -    -    -  /dev/null
</pre>


== Reference ==
* https://manpages.debian.org/jessie/systemd/tmpfiles.d.5.en.html


[[category:system]]
[[category:system]]

Revision as of 09:12, 5 July 2019

Overview

tmpfiles.d 디렉토리 내용 정리.

Basic

Configuration for creation, deletion and cleaning of volatile and temporary files.

tmpfiles.d 디렉토리의 설정 파일들은 tmpfs 및 temporary directory 의 임시 파일들을 관리한다.

/etc/tmpfiles.d/*.conf
/run/tmpfiles.d/*.conf
/usr/lib/tmpfiles.d/*.conf

systemd-tmpfiles uses the configuration files from the above directories to describe the creation, cleaning and removal of volatile and temporary files and directories which usually reside in directories such as /run or /tmp.

Volatile and temporary files and directories are those located in /run (and its alias /var/run), /tmp, /var/tmp, the API file systems such as /sys or /proc, as well as some other directories below /var.

System daemons frequently require private runtime directories below /run to place communication sockets and similar in. For these, consider declaring them in their unit files using RuntimeDirectory if this is feasible.

 df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.7G     0  3.7G   0% /dev
tmpfs           749M   76M  673M  11% /run
/dev/sda1       9.8G  8.5G  868M  91% /
tmpfs           3.7G     0  3.7G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           3.7G     0  3.7G   0% /sys/fs/cgroup

Configuration format

#Type Path        Mode UID  GID  Age Argument
d    /run/user   0755 root root 10d -
L    /tmp/foobar -    -    -    -   /dev/null

Reference