Systemd: /usr/lib/에 있는 구성 파일의 논리

Systemd: /usr/lib/에 있는 구성 파일의 논리

CentOS 7 기본 설치에서 /tmp및 디렉토리를 지우는 구성을 찾고 있습니다. 몇번의 검색 끝에 /var/tmp실제 보존 기간이 포함된 파일을 찾았습니다 ./usr/lib/tmpfiles.d/tmp.conf

이 파일 배치의 논리를 이해하고 싶습니다. "tmpfiles"라는 셀이 없다면 무작위 인터넷 검색 없이 어떻게 위치를 추론할 수 있습니까?

답변1

"tmpfiles"라는 셀이 없다면 무작위 인터넷 검색 없이 어떻게 위치를 추론할 수 있습니까?

% apropos tmp -l
systemd-gpt-auto-generator (8) - Generator for automatically discovering and mounting root, /home/, /srv/, /var/ and /var/tmp/ partitions, as well as discovering and enabling swap partitions, based on GPT partition type GUIDs.
systemd-tmpfiles (8) - Creates, deletes and cleans up volatile and temporary files and directories
systemd-tmpfiles-clean.service (8) - Creates, deletes and cleans up volatile and temporary files and directories
systemd-tmpfiles-clean.timer (8) - Creates, deletes and cleans up volatile and temporary files and directories
systemd-tmpfiles-setup-dev.service (8) - Creates, deletes and cleans up volatile and temporary files and directories
systemd-tmpfiles-setup.service (8) - Creates, deletes and cleans up volatile and temporary files and directories
systemd-update-utmp (8) - Write audit and utmp updates at bootup, runlevel changes and shutdown
systemd-update-utmp-runlevel.service (8) - Write audit and utmp updates at bootup, runlevel changes and shutdown
systemd-update-utmp.service (8) - Write audit and utmp updates at bootup, runlevel changes and shutdown
tmpfiles.d (5)       - Configuration for creation, deletion and cleaning of volatile and temporary files
utmpdump (1)         - dump UTMP and WTMP files in raw format

항목을 무시하고 utmp,man 8 systemd-tmpfiles다른 맨페이지와 마찬가지로 systemd-tmpfiles-*다음을 참조합니다.man 5 tmpfiles.d, 포함:

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


~/.config/user-tmpfiles.d/*.conf
$XDG_RUNTIME_DIR/user-tmpfiles.d/*.conf
~/.local/share/user-tmpfiles.d/*.conf
/usr/share/user-tmpfiles.d/*.conf

첫 번째 그룹은 시스템 구성을 위한 것이고 두 번째 그룹은 사용자 구성을 위한 것입니다.


논리의 경우 시스템 구성은 일반적으로 /usr/lib(또는 /libdistro 및 /usrunity에 따라 다르지만 distro 내에서는 일관됨) 해당 오버레이 디렉터리가 /etc및 에 있으므로 /run특별히 놀라운 것은 없습니다.

관련 정보