{"id":7161,"date":"2022-12-25T16:43:10","date_gmt":"2022-12-25T07:43:10","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=7161"},"modified":"2024-02-08T07:23:49","modified_gmt":"2024-02-07T22:23:49","slug":"rhel-8%e3%81%ae-tmp%e3%81%ae%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e5%89%8a%e9%99%a4%e3%81%ae%e8%a8%ad%e5%ae%9a%e3%82%92%e7%a2%ba%e8%aa%8d%e3%81%99%e3%82%8b%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/7161","title":{"rendered":"RHEL 8\u306e\/tmp\u306e\u30d5\u30a1\u30a4\u30eb\u524a\u9664\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\uff01"},"content":{"rendered":"<p>RHEL 8\u306e\/tmp\u306e\u524a\u9664\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>systemd\u3078\u306e\u767b\u9332\u6709\u7121\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>systemd\u306b\/tmp\u524a\u9664\u306e\u30b5\u30fc\u30d3\u30b9\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# systemctl list-unit-files | grep systemd-tmpfiles | sort\r\nsystemd-tmpfiles-clean.service             static   \r\nsystemd-tmpfiles-clean.timer               static   \r\nsystemd-tmpfiles-setup-dev.service         static   \r\nsystemd-tmpfiles-setup.service             static   \r\n<\/pre>\n<h2>\u30b5\u30fc\u30d3\u30b9\u306e\u8d77\u52d5\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\/tmp\u306e\u524a\u9664\u306b\u95a2\u3057\u3066\u306f\u3001\u300csystemd-tmpfiles-clean.service\u300d\u3068\u300csystemd-tmpfiles-clean.timer\u300d\u304c\u62c5\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,6,13,17]; title: ; notranslate\" title=\"\">\r\n# systemctl status systemd-tmpfiles-clean.service\r\n\u25cf systemd-tmpfiles-clean.service - Cleanup of Temporary Directories\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/systemd-tmpfiles-clean.service; static; vendor preset: disabled)\r\n   Active: inactive (dead) since Thu 2022-04-07 08:15:23 JST; 6h ago\r\n...\r\n# systemctl status systemd-tmpfiles-clean.timer\r\n systemctl status systemd-tmpfiles-clean.timer\r\n\u25cf systemd-tmpfiles-clean.timer - Daily Cleanup of Temporary Directories\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/systemd-tmpfiles-clean.timer; static; vendor preset: disabled)\r\n   Active: active (waiting) since Wed 2022-04-06 07:59:19 JST; 1 day 6h ago\r\n...\r\nWarning: journal has been rotated since unit was started, output may be incomplete.\r\n# systemctl status systemd-tmpfiles-setup-dev.service\r\n\u25cf systemd-tmpfiles-setup-dev.service - Create Static Device Nodes in \/dev\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/systemd-tmpfiles-setup-dev.service; static; vendor preset: disabled)\r\n   Active: active (exited) since Wed 2022-04-06 07:59:17 JST; 1 day 6h ago\r\n...\r\n# systemctl status systemd-tmpfiles-setup.service\r\n\u25cf systemd-tmpfiles-setup.service - Create Volatile Files and Directories\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/systemd-tmpfiles-setup.service; static; vendor preset: disabled)\r\n   Active: active (exited) since Wed 2022-04-06 07:59:19 JST; 1 day 6h ago\r\n...\r\n<\/pre>\n<h2>service\u3078\u306e\u767b\u9332\u5185\u5bb9\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u300csystemd-tmpfiles --clean\u300d\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# cat \/usr\/lib\/systemd\/system\/systemd-tmpfiles-clean.service\r\n#  SPDX-License-Identifier: LGPL-2.1+\r\n#\r\n#  This file is part of systemd.\r\n#\r\n#  systemd is free software; you can redistribute it and\/or modify it\r\n#  under the terms of the GNU Lesser General Public License as published by\r\n#  the Free Software Foundation; either version 2.1 of the License, or\r\n#  (at your option) any later version.\r\n\r\n&#x5B;Unit]\r\nDescription=Cleanup of Temporary Directories\r\nDocumentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)\r\nDefaultDependencies=no\r\nConflicts=shutdown.target\r\nAfter=local-fs.target time-sync.target\r\nBefore=shutdown.target\r\n\r\n&#x5B;Service]\r\nType=oneshot\r\nExecStart=\/usr\/bin\/systemd-tmpfiles --clean\r\nSuccessExitStatus=65\r\nIOSchedulingClass=idle\r\n<\/pre>\n<h2>\u8d77\u52d5\u30bf\u30a4\u30df\u30f3\u30b0\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u8d77\u52d5\u30bf\u30a4\u30df\u30f3\u30b0\u306f\u3001\u30d6\u30fc\u30c8\u5f8c15\u5206\u3068\u305d\u306e\u5f8c1\u6642\u9593\u304a\u304d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# cat \/usr\/lib\/systemd\/system\/systemd-tmpfiles-clean.timer\r\n#  SPDX-License-Identifier: LGPL-2.1+\r\n#\r\n#  This file is part of systemd.\r\n#\r\n#  systemd is free software; you can redistribute it and\/or modify it\r\n#  under the terms of the GNU Lesser General Public License as published by\r\n#  the Free Software Foundation; either version 2.1 of the License, or\r\n#  (at your option) any later version.\r\n\r\n&#x5B;Unit]\r\nDescription=Daily Cleanup of Temporary Directories\r\nDocumentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)\r\n\r\n&#x5B;Timer]\r\nOnBootSec=15min\r\nOnUnitActiveSec=1d\r\n<\/pre>\n<h2>\u524a\u9664\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# cat \/usr\/lib\/tmpfiles.d\/tmp.conf\r\n#  This file is part of systemd.\r\n#\r\n#  systemd is free software; you can redistribute it and\/or modify it\r\n#  under the terms of the GNU Lesser General Public License as published by\r\n#  the Free Software Foundation; either version 2.1 of the License, or\r\n#  (at your option) any later version.\r\n\r\n# See tmpfiles.d(5) for details\r\n\r\n# Clear tmp directories separately, to make them easier to override\r\nq \/tmp 1777 root root 10d\r\nq \/var\/tmp 1777 root root 30d\r\n\r\n# Exclude namespace mountpoints created with PrivateTmp=yes\r\nx \/tmp\/systemd-private-%b-*\r\nX \/tmp\/systemd-private-%b-*\/tmp\r\nx \/var\/tmp\/systemd-private-%b-*\r\nX \/var\/tmp\/systemd-private-%b-*\/tmp\r\n\r\n# Remove top-level private temporary directories on each boot\r\nR! \/tmp\/systemd-private-*\r\nR! \/var\/tmp\/systemd-private-*\r\n<\/pre>\n<h2>\/tmp\u306e\u72b6\u614b\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\/tmp\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u524a\u9664\u3055\u308c\u3066\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# ls -l \/tmp\r\ntotal 0\r\ndrwx------. 3 root     root     17 Apr  6 07:59 systemd-private-82dc82d420a4462487ba5755961dbfad-colord.service-HYf1Se\r\ndrwx------. 3 root     root     17 Apr  6 07:59 systemd-private-82dc82d420a4462487ba5755961dbfad-ModemManager.service-hmibQh\r\ndrwx------. 3 root     root     17 Apr  6 07:59 systemd-private-82dc82d420a4462487ba5755961dbfad-rtkit-daemon.service-g0SOCg\r\ndrwx------. 2 usradmin usradmin  6 Mar 24 15:36 tracker-extract-files.1000\r\n<\/pre>\n<h2>tmp.conf\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>man\u30b3\u30de\u30f3\u30c9\u3067\u3001\u300ctmp.conf\u300d\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u69d8\u3005\u306a\u30bf\u30a4\u30d7\u306e\u4e00\u6642\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u3068\u524a\u9664\u3092\u3001\u300ctmp.conf\u300d\u306e\u8a2d\u5b9a\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# man tmpfiles.d\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>\/tmp\u306e\u914d\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001systemd\u3067\u7ba1\u7406\u3055\u308c\u305f\u30b5\u30fc\u30d3\u30b9\u306b\u3088\u308a\u81ea\u52d5\u3067\u524a\u9664\u3055\u308c\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>\u53c2\u8003\u60c5\u5831<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.redhat.com\/en\/technologies\/linux-platforms\/enterprise-linux\" target=\"_blank\" rel=\"noopener\">Red Hat Enterprise Linux<\/a><\/li>\n<\/ul>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/4965\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011RHEL\u7cfb\u306eOS\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2022\/04\/fi_rhel_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011RHEL\u7cfb\u306eOS\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">RHEL\u7cfb\u306eOS\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u95a2\u9023\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><a href=\"https:\/\/amzn.to\/3H8WqP7\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" class=\"paapi5-pa-product-image-source\" src=\"https:\/\/m.media-amazon.com\/images\/I\/41Hsgz5kRSL._SL160_.jpg\" alt=\"N\/A\"><\/a><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>RHEL 8\u306e\/tmp\u306e\u524a\u9664\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5291,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239],"tags":[],"class_list":["post-7161","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rhel-8"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=7161"}],"version-history":[{"count":2,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7161\/revisions"}],"predecessor-version":[{"id":15910,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7161\/revisions\/15910"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/5291"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=7161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=7161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=7161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}