{
    "content": [
        {
            "type": "text",
            "text": "# tmpfiles.d (info)\n\n## NAME\n\ntmpfiles.d - Configuration for creation, deletion and cleaning of volatile and temporary files\n\n## SYNOPSIS\n\n/etc/tmpfiles.d/*.conf\n/run/tmpfiles.d/*.conf\n/usr/lib/tmpfiles.d/*.conf\n~/.config/user-tmpfiles.d/*.conf\n$XDGRUNTIMEDIR/user-tmpfiles.d/*.conf\n~/.local/share/user-tmpfiles.d/*.conf\n...\n/usr/share/user-tmpfiles.d/*.conf\n#Type Path                                     Mode User Group Age         Argument\nf     /file/to/create                          mode user group -           content\nf+    /file/to/create-or-truncate              mode user group -           content\nw     /file/to/write-to                        -    -    -     -           content\nw+    /file/to/append-to                       -    -    -     -           content\nd     /directory/to/create-and-cleanup         mode user group cleanup-age -\nD     /directory/to/create-and-remove          mode user group cleanup-age -\ne     /directory/to/cleanup                    mode user group cleanup-age -\nv     /subvolume-or-directory/to/create        mode user group -           -\nq     /subvolume-or-directory/to/create        mode user group -           -\nQ     /subvolume-or-directory/to/create        mode user group -           -\np     /fifo/to/create                          mode user group -           -\np+    /fifo/to/[re]create                      mode user group -           -\nL     /symlink/to/create                       -    -    -     -           symlink/target/path\nL+    /symlink/to/[re]create                   -    -    -     -           symlink/target/path\nc     /dev/char-device-to-create               mode user group -           major:minor\nc+    /dev/char-device-to-[re]create           mode user group -           major:minor\nb     /dev/block-device-to-create              mode user group -           major:minor\nb+    /dev/block-device-to-[re]create          mode user group -           major:minor\nC     /target/to/create                        -    -    -     -           /source/to/copy\nx     /path-or-glob/to/ignore/recursively      -    -    -     -           -\nX     /path-or-glob/to/ignore                  -    -    -     -           -\nr     /empty/dir/to/remove                     -    -    -     -           -\nR     /dir/to/remove/recursively               -    -    -     -           -\nz     /path-or-glob/to/adjust/mode             mode user group -           -\nZ     /path-or-glob/to/adjust/mode/recursively mode user group -           -\nt     /path-or-glob/to/set/xattrs              -    -    -     -           xattrs\nT     /path-or-glob/to/set/xattrs/recursively  -    -    -     -           xattrs\nh     /path-or-glob/to/set/attrs               -    -    -     -           file attrs\nH     /path-or-glob/to/set/attrs/recursively   -    -    -     -           file attrs\na     /path-or-glob/to/set/acls                -    -    -     -           POSIX ACLs\na+    /path-or-glob/to/append/acls             -    -    -     -           POSIX ACLs\nA     /path-or-glob/to/set/acls/recursively    -    -    -     -           POSIX ACLs\nA+    /path-or-glob/to/append/acls/recursively -    -    -     -           POSIX ACLs\n\n## DESCRIPTION\n\ntmpfiles.d configuration files provide a generic mechanism to define\nthe creation of regular files, directories, pipes, and device nodes,\nadjustments to their access mode, ownership, attributes, quota\nassignments, and contents, and finally their time-based removal. It is\nmostly commonly used for volatile and temporary files and directories\n(such as those located under /run/, /tmp/, /var/tmp/, the API file\nsystems such as /sys/ or /proc/, as well as some other directories\nbelow /var/).\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONFIGURATION DIRECTORIES AND PRECEDENCE**\n- **CONFIGURATION FILE FORMAT**\n- **SPECIFIERS**\n- **EXAMPLES**\n- **SEE ALSO**\n- **NOTES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "tmpfiles.d",
        "section": "",
        "mode": "info",
        "summary": "tmpfiles.d - Configuration for creation, deletion and cleaning of volatile and temporary files",
        "synopsis": "/etc/tmpfiles.d/*.conf\n/run/tmpfiles.d/*.conf\n/usr/lib/tmpfiles.d/*.conf\n~/.config/user-tmpfiles.d/*.conf\n$XDGRUNTIMEDIR/user-tmpfiles.d/*.conf\n~/.local/share/user-tmpfiles.d/*.conf\n...\n/usr/share/user-tmpfiles.d/*.conf\n#Type Path                                     Mode User Group Age         Argument\nf     /file/to/create                          mode user group -           content\nf+    /file/to/create-or-truncate              mode user group -           content\nw     /file/to/write-to                        -    -    -     -           content\nw+    /file/to/append-to                       -    -    -     -           content\nd     /directory/to/create-and-cleanup         mode user group cleanup-age -\nD     /directory/to/create-and-remove          mode user group cleanup-age -\ne     /directory/to/cleanup                    mode user group cleanup-age -\nv     /subvolume-or-directory/to/create        mode user group -           -\nq     /subvolume-or-directory/to/create        mode user group -           -\nQ     /subvolume-or-directory/to/create        mode user group -           -\np     /fifo/to/create                          mode user group -           -\np+    /fifo/to/[re]create                      mode user group -           -\nL     /symlink/to/create                       -    -    -     -           symlink/target/path\nL+    /symlink/to/[re]create                   -    -    -     -           symlink/target/path\nc     /dev/char-device-to-create               mode user group -           major:minor\nc+    /dev/char-device-to-[re]create           mode user group -           major:minor\nb     /dev/block-device-to-create              mode user group -           major:minor\nb+    /dev/block-device-to-[re]create          mode user group -           major:minor\nC     /target/to/create                        -    -    -     -           /source/to/copy\nx     /path-or-glob/to/ignore/recursively      -    -    -     -           -\nX     /path-or-glob/to/ignore                  -    -    -     -           -\nr     /empty/dir/to/remove                     -    -    -     -           -\nR     /dir/to/remove/recursively               -    -    -     -           -\nz     /path-or-glob/to/adjust/mode             mode user group -           -\nZ     /path-or-glob/to/adjust/mode/recursively mode user group -           -\nt     /path-or-glob/to/set/xattrs              -    -    -     -           xattrs\nT     /path-or-glob/to/set/xattrs/recursively  -    -    -     -           xattrs\nh     /path-or-glob/to/set/attrs               -    -    -     -           file attrs\nH     /path-or-glob/to/set/attrs/recursively   -    -    -     -           file attrs\na     /path-or-glob/to/set/acls                -    -    -     -           POSIX ACLs\na+    /path-or-glob/to/append/acls             -    -    -     -           POSIX ACLs\nA     /path-or-glob/to/set/acls/recursively    -    -    -     -           POSIX ACLs\nA+    /path-or-glob/to/append/acls/recursively -    -    -     -           POSIX ACLs",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Example 1. Create directories with specific mode and ownership",
            "screen(1), needs two directories created at boot with specific modes",
            "and ownership:",
            "# /usr/lib/tmpfiles.d/screen.conf",
            "d /run/screens  1777 root screen 10d",
            "d /run/uscreens 0755 root screen 10d12h",
            "Contents of /run/screens and /run/uscreens will be cleaned up after 10",
            "and 101/2 days, respectively.",
            "Example 2. Create a directory with a SMACK attribute",
            "D /run/cups - - - -",
            "t /run/cups - - - - security.SMACK64=printing user.attr-with-spaces=\"foo bar\"",
            "The directory will be owned by root and have default mode. Its contents",
            "are not subject to time based cleanup, but will be obliterated when",
            "systemd-tmpfiles --remove runs.",
            "Example 3. Create a directory and prevent its contents from cleanup",
            "abrt(1), needs a directory created at boot with specific mode and",
            "ownership and its content should be preserved from the automatic",
            "cleanup applied to the contents of /var/tmp:",
            "# /usr/lib/tmpfiles.d/tmp.conf",
            "d /var/tmp 1777 root root 30d",
            "# /usr/lib/tmpfiles.d/abrt.conf",
            "d /var/tmp/abrt 0755 abrt abrt -",
            "Example 4. Apply clean up during boot and based on time",
            "# /usr/lib/tmpfiles.d/dnf.conf",
            "r! /var/cache/dnf/*/*/downloadlock.pid",
            "r! /var/cache/dnf/*/*/metadatalock.pid",
            "r! /var/lib/dnf/rpmdblock.pid",
            "e  /var/cache/dnf/ - - - 30d",
            "The lock files will be removed during boot. Any files and directories",
            "in /var/cache/dnf/ will be removed after they have not been accessed in",
            "30 days.",
            "Example 5. Empty the contents of a cache directory on boot",
            "# /usr/lib/tmpfiles.d/krb5rcache.conf",
            "e! /var/cache/krb5rcache - - - 0",
            "Any files and subdirectories in /var/cache/krb5rcache/ will be removed",
            "on boot. The directory will not be created.",
            "/RUN/ AND /VAR/RUN/",
            "/var/run/ is a deprecated symlink to /run/, and applications should use",
            "the latter.  systemd-tmpfiles will warn if /var/run/ is used."
        ],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "systemd-tmpfiles",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-tmpfiles/8/json"
            },
            {
                "name": "systemd-delta",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-delta/1/json"
            },
            {
                "name": "systemd.exec",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.exec/5/json"
            },
            {
                "name": "attr",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/attr/5/json"
            },
            {
                "name": "getfattr",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/getfattr/1/json"
            },
            {
                "name": "setfattr",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/setfattr/1/json"
            },
            {
                "name": "setfacl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/setfacl/1/json"
            },
            {
                "name": "getfacl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/getfacl/1/json"
            },
            {
                "name": "chattr",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/chattr/1/json"
            },
            {
                "name": "btrfs-subvolume",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-subvolume/8/json"
            },
            {
                "name": "btrfs-qgroup",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-qgroup/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 45,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 28,
                "subsections": []
            },
            {
                "name": "CONFIGURATION DIRECTORIES AND PRECEDENCE",
                "lines": 31,
                "subsections": []
            },
            {
                "name": "CONFIGURATION FILE FORMAT",
                "lines": 401,
                "subsections": []
            },
            {
                "name": "SPECIFIERS",
                "lines": 188,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 57,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "tmpfiles.d - Configuration for creation, deletion and cleaning of\nvolatile and temporary files\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "/etc/tmpfiles.d/*.conf\n/run/tmpfiles.d/*.conf\n/usr/lib/tmpfiles.d/*.conf\n\n~/.config/user-tmpfiles.d/*.conf\n$XDGRUNTIMEDIR/user-tmpfiles.d/*.conf\n~/.local/share/user-tmpfiles.d/*.conf\n...\n/usr/share/user-tmpfiles.d/*.conf\n\n#Type Path                                     Mode User Group Age         Argument\nf     /file/to/create                          mode user group -           content\nf+    /file/to/create-or-truncate              mode user group -           content\nw     /file/to/write-to                        -    -    -     -           content\nw+    /file/to/append-to                       -    -    -     -           content\nd     /directory/to/create-and-cleanup         mode user group cleanup-age -\nD     /directory/to/create-and-remove          mode user group cleanup-age -\ne     /directory/to/cleanup                    mode user group cleanup-age -\nv     /subvolume-or-directory/to/create        mode user group -           -\nq     /subvolume-or-directory/to/create        mode user group -           -\nQ     /subvolume-or-directory/to/create        mode user group -           -\np     /fifo/to/create                          mode user group -           -\np+    /fifo/to/[re]create                      mode user group -           -\nL     /symlink/to/create                       -    -    -     -           symlink/target/path\nL+    /symlink/to/[re]create                   -    -    -     -           symlink/target/path\nc     /dev/char-device-to-create               mode user group -           major:minor\nc+    /dev/char-device-to-[re]create           mode user group -           major:minor\nb     /dev/block-device-to-create              mode user group -           major:minor\nb+    /dev/block-device-to-[re]create          mode user group -           major:minor\nC     /target/to/create                        -    -    -     -           /source/to/copy\nx     /path-or-glob/to/ignore/recursively      -    -    -     -           -\nX     /path-or-glob/to/ignore                  -    -    -     -           -\nr     /empty/dir/to/remove                     -    -    -     -           -\nR     /dir/to/remove/recursively               -    -    -     -           -\nz     /path-or-glob/to/adjust/mode             mode user group -           -\nZ     /path-or-glob/to/adjust/mode/recursively mode user group -           -\nt     /path-or-glob/to/set/xattrs              -    -    -     -           xattrs\nT     /path-or-glob/to/set/xattrs/recursively  -    -    -     -           xattrs\nh     /path-or-glob/to/set/attrs               -    -    -     -           file attrs\nH     /path-or-glob/to/set/attrs/recursively   -    -    -     -           file attrs\na     /path-or-glob/to/set/acls                -    -    -     -           POSIX ACLs\na+    /path-or-glob/to/append/acls             -    -    -     -           POSIX ACLs\nA     /path-or-glob/to/set/acls/recursively    -    -    -     -           POSIX ACLs\nA+    /path-or-glob/to/append/acls/recursively -    -    -     -           POSIX ACLs\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "tmpfiles.d configuration files provide a generic mechanism to define\nthe creation of regular files, directories, pipes, and device nodes,\nadjustments to their access mode, ownership, attributes, quota\nassignments, and contents, and finally their time-based removal. It is\nmostly commonly used for volatile and temporary files and directories\n(such as those located under /run/, /tmp/, /var/tmp/, the API file\nsystems such as /sys/ or /proc/, as well as some other directories\nbelow /var/).\n\nsystemd-tmpfiles uses this configuration to create volatile files and\ndirectories during boot and to do periodic cleanup afterwards. See\nsystemd-tmpfiles(5) for the description of\nsystemd-tmpfiles-setup.service, systemd-tmpfiles-clean.service, and\nassociated units.\n\nSystem daemons frequently require private runtime directories below\n/run/ to store communication sockets and similar. For these, it is\nbetter to use RuntimeDirectory= in their unit files (see\nsystemd.exec(5) for details), if the flexibility provided by tmpfiles.d\nis not required. The advantages are that the configuration required by\nthe unit is centralized in one place, and that the lifetime of the\ndirectory is tied to the lifetime of the service itself. Similarly,\nStateDirectory=, CacheDirectory=, LogsDirectory=, and\nConfigurationDirectory= should be used to create directories under\n/var/lib/, /var/cache/, /var/log/, and /etc/.  tmpfiles.d should be\nused for files whose lifetime is independent of any service or requires\nmore complicated configuration.\n",
                "subsections": []
            },
            "CONFIGURATION DIRECTORIES AND PRECEDENCE": {
                "content": "Each configuration file shall be named in the style of package.conf or\npackage-part.conf. The second variant should be used when it is\ndesirable to make it easy to override just this part of configuration.\n\nFiles in /etc/tmpfiles.d override files with the same name in\n/usr/lib/tmpfiles.d and /run/tmpfiles.d. Files in /run/tmpfiles.d\noverride files with the same name in /usr/lib/tmpfiles.d. Packages\nshould install their configuration files in /usr/lib/tmpfiles.d. Files\nin /etc/tmpfiles.d are reserved for the local administrator, who may\nuse this logic to override the configuration files installed by vendor\npackages. All configuration files are sorted by their filename in\nlexicographic order, regardless of which of the directories they reside\nin. If multiple files specify the same path, the entry in the file with\nthe lexicographically earliest name will be applied (note that lines\nsuppressed due to the \"!\"  are filtered before application, meaning\nthat if an early line carries the exclamation mark and is suppressed\nbecause of that, a later line matching in path will be applied). All\nother conflicting entries will be logged as errors. When two lines are\nprefix path and suffix path of each other, then the prefix line is\nalways created first, the suffix later (and if removal applies to the\nline, the order is reversed: the suffix is removed first, the prefix\nlater). Lines that take globs are applied after those accepting no\nglobs. If multiple operations shall be applied on the same file (such\nas ACL, xattr, file attribute adjustments), these are always done in\nthe same fixed order. Except for those cases, the files/directories are\nprocessed in the order they are listed.\n\nIf the administrator wants to disable a configuration file supplied by\nthe vendor, the recommended way is to place a symlink to /dev/null in\n/etc/tmpfiles.d/ bearing the same filename.\n",
                "subsections": []
            },
            "CONFIGURATION FILE FORMAT": {
                "content": "The configuration format is one line per path, containing type, path,\nmode, ownership, age, and argument fields. The lines are separated by\nnewlines, the fields by whitespace:\n\n#Type Path        Mode User Group Age Argument...\nd     /run/user   0755 root root  10d -\nL     /tmp/foobar -    -    -     -   /dev/null\n\nFields may contain C-style escapes. With the exception of the seventh\nfield (the \"argument\") all fields may be enclosed in quotes. Note that\nany whitespace found in the line after the beginning of the argument\nfield will be considered part of the argument field. To begin the\nargument field with a whitespace character, use C-style escapes (e.g.\n\"\\x20\").\n\nType\nThe type consists of a single letter and optionally an exclamation mark\n(\"!\") minus sign (\"-\"), and/or equals sign (\"=\").\n\nThe following line types are understood:\n\nf, f+\nf will create a file if it does not exist yet. If the argument\nparameter is given and the file did not exist yet, it will be\nwritten to the file.  f+ will create or truncate the file. If the\nargument parameter is given, it will be written to the file. Does\nnot follow symlinks.\n\nw, w+\nWrite the argument parameter to a file, if the file exists. If\nsuffixed with +, the line will be appended to the file. If your\nconfiguration writes multiple lines to the same file, use w+. Lines\nof this type accept shell-style globs in place of normal path\nnames. The argument parameter will be written without a trailing\nnewline. C-style backslash escapes are interpreted. Follows\nsymlinks.\n\nd\nCreate a directory. The mode and ownership will be adjusted if\nspecified. Contents of this directory are subject to time based\ncleanup if the age argument is specified.\n\nD\nSimilar to d, but in addition the contents of the directory will be\nremoved when --remove is used.\n\ne\nAdjust the mode and ownership of existing directories and remove\ntheir contents based on age. Lines of this type accept shell-style\nglobs in place of normal path names. Contents of the directories\nare subject to time based cleanup if the age argument is specified.\nIf the age argument is \"0\", contents will be unconditionally\ndeleted every time systemd-tmpfiles --clean is run.\n\nFor this entry to be useful, at least one of the mode, user, group,\nor age arguments must be specified, since otherwise this entry has\nno effect. As an exception, an entry with no effect may be useful\nwhen combined with !, see the examples.\n\nv\nCreate a subvolume if the path does not exist yet, the file system\nsupports subvolumes (btrfs), and the system itself is installed\ninto a subvolume (specifically: the root directory / is itself a\nsubvolume). Otherwise, create a normal directory, in the same way\nas d.\n\nA subvolume created with this line type is not assigned to any\nhigher-level quota group. For that, use q or Q, which allow\ncreating simple quota group hierarchies, see below.\n\nq\nCreate a subvolume or directory the same as v, but assign the\nsubvolume to the same higher-level quota groups as the parent. This\nensures that higher-level limits and accounting applied to the\nparent subvolume also include the specified subvolume. On non-btrfs\nfile systems, this line type is identical to d.\n\nIf the subvolume already exists, no change to the quota hierarchy\nis made, regardless of whether the subvolume is already attached to\na quota group or not. Also see Q below. See btrfs-qgroup(8) for\ndetails about the btrfs quota group concept.\n\nQ\nCreate the subvolume or directory the same as v, but assign the new\nsubvolume to a new leaf quota group. Instead of copying the\nhigher-level quota group assignments from the parent as is done\nwith q, the lowest quota group of the parent subvolume is\ndetermined that is not the leaf quota group. Then, an\n\"intermediary\" quota group is inserted that is one level below this\nlevel, and shares the same ID part as the specified subvolume. If\nno higher-level quota group exists for the parent subvolume, a new\nquota group at level 255 sharing the same ID as the specified\nsubvolume is inserted instead. This new intermediary quota group is\nthen assigned to the parent subvolume's higher-level quota groups,\nand the specified subvolume's leaf quota group is assigned to it.\n\nEffectively, this has a similar effect as q, however introduces a\nnew higher-level quota group for the specified subvolume that may\nbe used to enforce limits and accounting to the specified subvolume\nand children subvolume created within it. Thus, by creating\nsubvolumes only via q and Q, a concept of \"subtree quotas\" is\nimplemented. Each subvolume for which Q is set will get a \"subtree\"\nquota group created, and all child subvolumes created within it\nwill be assigned to it. Each subvolume for which q is set will not\nget such a \"subtree\" quota group, but it is ensured that they are\nadded to the same \"subtree\" quota group as their immediate parents.\n\nIt is recommended to use Q for subvolumes that typically contain\nfurther subvolumes, and where it is desirable to have accounting\nand quota limits on all child subvolumes together. Examples for Q\nare typically /home/ or /var/lib/machines/. In contrast, q should\nbe used for subvolumes that either usually do not include further\nsubvolumes or where no accounting and quota limits are needed that\napply to all child subvolumes together. Examples for q are\ntypically /var/ or /var/tmp/.\n\nAs with q, Q has no effect on the quota group hierarchy if the\nsubvolume already exists, regardless of whether the subvolume\nalready belong to a quota group or not.\n\np, p+\nCreate a named pipe (FIFO) if it does not exist yet. If suffixed\nwith + and a file already exists where the pipe is to be created,\nit will be removed and be replaced by the pipe.\n\nL, L+\nCreate a symlink if it does not exist yet. If suffixed with + and a\nfile or directory already exists where the symlink is to be\ncreated, it will be removed and be replaced by the symlink. If the\nargument is omitted, symlinks to files with the same name residing\nin the directory /usr/share/factory/ are created. Note that\npermissions and ownership on symlinks are ignored.\n\nc, c+\nCreate a character device node if it does not exist yet. If\nsuffixed with + and a file already exists where the device node is\nto be created, it will be removed and be replaced by the device\nnode. It is recommended to suffix this entry with an exclamation\nmark to only create static device nodes at boot, as udev will not\nmanage static device nodes that are created at runtime.\n\nb, b+\nCreate a block device node if it does not exist yet. If suffixed\nwith + and a file already exists where the device node is to be\ncreated, it will be removed and be replaced by the device node. It\nis recommended to suffix this entry with an exclamation mark to\nonly create static device nodes at boot, as udev will not manage\nstatic device nodes that are created at runtime.\n\nC\nRecursively copy a file or directory, if the destination files or\ndirectories do not exist yet or the destination directory is empty.\nNote that this command will not descend into subdirectories if the\ndestination directory already exists and is not empty. Instead, the\nentire copy operation is skipped. If the argument is omitted, files\nfrom the source directory /usr/share/factory/ with the same name\nare copied. Does not follow symlinks.\n\nx\nIgnore a path during cleaning. Use this type to exclude paths from\nclean-up as controlled with the Age parameter. Note that lines of\nthis type do not influence the effect of r or R lines. Lines of\nthis type accept shell-style globs in place of normal path names.\n\nX\nIgnore a path during cleaning. Use this type to exclude paths from\nclean-up as controlled with the Age parameter. Unlike x, this\nparameter will not exclude the content if path is a directory, but\nonly directory itself. Note that lines of this type do not\ninfluence the effect of r or R lines. Lines of this type accept\nshell-style globs in place of normal path names.\n\nr\nRemove a file or directory if it exists. This may not be used to\nremove non-empty directories, use R for that. Lines of this type\naccept shell-style globs in place of normal path names. Does not\nfollow symlinks.\n\nR\nRecursively remove a path and all its subdirectories (if it is a\ndirectory). Lines of this type accept shell-style globs in place of\nnormal path names. Does not follow symlinks.\n\nz\nAdjust the access mode, user and group ownership, and restore the\nSELinux security context of a file or directory, if it exists.\nLines of this type accept shell-style globs in place of normal path\nnames. Does not follow symlinks.\n\nZ\nRecursively set the access mode, user and group ownership, and\nrestore the SELinux security context of a file or directory if it\nexists, as well as of its subdirectories and the files contained\ntherein (if applicable). Lines of this type accept shell-style\nglobs in place of normal path names. Does not follow symlinks.\n\nt\nSet extended attributes, see attr(5) for details. The argument\nfield should take one or more assignment expressions in the form\nnamespace.attribute=value, for examples see below. Lines of this\ntype accept shell-style globs in place of normal path names. This\ncan be useful for setting SMACK labels. Does not follow symlinks.\n\nPlease note that extended attributes settable with this line type\nare a different concept from the Linux file attributes settable\nwith h/H, see below.\n\nT\nSame as t, but operates recursively.\n\nh\nSet Linux file/directory attributes. Lines of this type accept\nshell-style globs in place of normal path names.\n\nThe format of the argument field is [+-=][aAcCdDeijPsStTu]. The\nprefix + (the default one) causes the attribute(s) to be added; -\ncauses the attribute(s) to be removed; = causes the attributes to\nbe set exactly as the following letters. The letters\n\"aAcCdDeijPsStTu\" select the new attributes for the files, see\nchattr(1) for further information.\n\nPassing only = as argument resets all the file attributes listed\nabove. It has to be pointed out that the = prefix limits itself to\nthe attributes corresponding to the letters listed here. All other\nattributes will be left untouched. Does not follow symlinks.\n\nPlease note that the Linux file attributes settable with this line\ntype are a different concept from the extended attributes settable\nwith t/T, see above.\n\nH\nSames as h, but operates recursively.\n\na, a+\nSet POSIX ACLs (access control lists), see acl(5). If suffixed with\n+, the specified entries will be added to the existing set.\nsystemd-tmpfiles will automatically add the required base entries\nfor user and group based on the access mode of the file, unless\nbase entries already exist or are explicitly specified. The mask\nwill be added if not specified explicitly or already present. Lines\nof this type accept shell-style globs in place of normal path\nnames. This can be useful for allowing additional access to certain\nfiles. Does not follow symlinks.\n\nA, A+\nSame as a and a+, but recursive. Does not follow symlinks.\n\nIf the exclamation mark (\"!\") is used, this line is only safe to\nexecute during boot, and can break a running system. Lines without the\nexclamation mark are presumed to be safe to execute at any time, e.g.\non package upgrades.  systemd-tmpfiles will take lines with an\nexclamation mark only into consideration, if the --boot option is\ngiven.\n\nFor example:\n\n# Make sure these are created by default so that nobody else can\nd /tmp/.X11-unix 1777 root root 10d\n\n# Unlink the X11 lock files\nr! /tmp/.X[0-9]*-lock\n\nThe second line in contrast to the first one would break a running\nsystem, and will only be executed with --boot.\n\nIf the minus sign (\"-\") is used, this line failing to run successfully\nduring create (and only create) will not cause the execution of\nsystemd-tmpfiles to return an error.\n\nFor example:\n\n# Modify sysfs but don't fail if we are in a container with a read-only /proc\nw- /proc/sys/vm/swappiness - - - - 10\n\nIf the equals sign (\"=\") is used, the file types of existing objects in\nthe specified path are checked, and removed if they do not match. This\nincludes any implicitly created parent directories (which can be either\ndirectories or directory symlinks). For example, if there is a FIFO in\nplace of one of the parent path components it will be replaced with a\ndirectory.\n\nNote that for all line types that result in creation of any kind of\nfile node (i.e.  f/F, d/D/v/q/Q, p, L, c/b and C) leading directories\nare implicitly created if needed, owned by root with an access mode of\n0755. In order to create them with different modes or ownership make\nsure to add appropriate d lines.\n\nPath\nThe file system path specification supports simple specifier expansion,\nsee below. The path (after expansion) must be absolute.\n\nMode\nThe file access mode to use when creating this file or directory. If\nomitted or when set to \"-\", the default is used: 0755 for directories,\n0644 for all other file objects. For z, Z lines, if omitted or when set\nto \"-\", the file access mode will not be modified. This parameter is\nignored for x, r, R, L, t, and a lines.\n\nOptionally, if prefixed with \"~\", the access mode is masked based on\nthe already set access bits for existing file or directories: if the\nexisting file has all executable bits unset, all executable bits are\nremoved from the new access mode, too. Similarly, if all read bits are\nremoved from the old access mode, they will be removed from the new\naccess mode too, and if all write bits are removed, they will be\nremoved from the new access mode too. In addition, the sticky/SUID/SGID\nbit is removed unless applied to a directory. This functionality is\nparticularly useful in conjunction with Z.\n\nUser, Group\nThe user and group to use for this file or directory. This may either\nbe a numeric ID or a user/group name. If omitted or when set to \"-\",\nthe user and group of the user who invokes systemd-tmpfiles is used.\nFor z and Z lines, when omitted or when set to \"-\", the file ownership\nwill not be modified. These parameters are ignored for x, r, R, L, t,\nand a lines.\n\nThis field should generally only reference system users/groups, i.e.\nusers/groups that are guaranteed to be resolvable during early boot. If\nthis field references users/groups that only become resolveable during\nlater boot (i.e. after NIS, LDAP or a similar networked directory\nservice become available), execution of the operations declared by the\nline will likely fail. Also see Notes on Resolvability of User and\nGroup Names[1] for more information on requirements on system\nuser/group definitions.\n\nAge\nThe date field, when set, is used to decide what files to delete when\ncleaning. If a file or directory is older than the current time minus\nthe age field, it is deleted. The field format is a series of integers\neach followed by one of the following suffixes for the respective time\nunits: s, m or min, h, d, w, ms, and us, meaning seconds, minutes,\nhours, days, weeks, milliseconds, and microseconds, respectively. Full\nnames of the time units can be used too.\n\nIf multiple integers and units are specified, the time values are\nsummed. If an integer is given without a unit, s is assumed.\n\nWhen the age is set to zero, the files are cleaned unconditionally.\n\nThe age field only applies to lines starting with d, D, e, v, q, Q, C,\nx and X. If omitted or set to \"-\", no automatic clean-up is done.\n\nIf the age field starts with a tilde character \"~\", clean-up is only\napplied to files and directories one level inside the directory\nspecified, but not the files and directories immediately inside it.\n\nThe age of a file system entry is determined from its last modification\ntimestamp (mtime), its last access timestamp (atime), and (except for\ndirectories) its last status change timestamp (ctime). By default, any\nof these three (or two) values will prevent cleanup if it is more\nrecent than the current time minus the age field. To restrict the\ndeletion based on particular type of file timestamps, the age-by\nargument can be used.\n\nThe age-by argument overrides the timestamp types to be used for the\nage check. It can be specified by prefixing the age argument with a\nsequence of characters to specify the timestamp types and a colon\n(\":\"): \"age-by...:cleanup-age\". The argument can consist of a (A for\ndirectories), b (B for directories), c (C for directories), or m (M for\ndirectories). Those respectively indicate access, creation, last status\nchange, and last modification time of a file system entry. The\nlower-case letter signifies that the given timestamp type should be\nconsidered for files, while the upper-case letter signifies that the\ngiven timestamp type should be considered for directories. See statx(2)\nfile timestamp fields for more details about timestamp types.\n\nIf not specified, the age-by field defaults to abcmABM, i.e. by default\nall file timestamps are taken into consideration, with the exception of\nthe last status change timestamp (ctime) for directories. This is\nbecause the aging logic itself will alter the ctime whenever it deletes\na file inside it. To ensure that running the aging logic does not feed\nback into the next iteration of itself, ctime for directories is\nignored by default.\n\nFor example:\n\n# Files created and modified, and directories accessed more than\n# an hour ago in \"/tmp/foo/bar\", are subject to time-based cleanup.\nd /tmp/foo/bar - - - - bmA:1h -\n\nNote that while the aging algorithm is run a 'shared' BSD file lock\n(see flock(2)) is taken on each directory the algorithm descends into\n(and each directory below that, and so on). If the aging algorithm\nfinds a lock is already taken on some directory, it (and everything\nbelow it) is skipped. Applications may use this to temporarily exclude\ncertain directory subtrees from the aging algorithm: the applications\ncan take a BSD file lock themselves, and as long as they keep it aging\nof the directory and everything below it is disabled.\n\nArgument\nFor L lines determines the destination path of the symlink. For c and\nb, determines the major/minor of the device node, with major and minor\nformatted as integers, separated by \":\", e.g.  \"1:3\". For f, F, and w,\nthe argument may be used to specify a short string that is written to\nthe file, suffixed by a newline. For C, specifies the source file or\ndirectory. For t and T, determines extended attributes to be set. For a\nand A, determines ACL attributes to be set. For h and H, determines the\nfile attributes to set. Ignored for all other lines.\n\nThis field can contain specifiers, see below.\n",
                "subsections": []
            },
            "SPECIFIERS": {
                "content": "Specifiers can be used in the \"path\" and \"argument\" fields. An unknown\nor unresolvable specifier is treated as invalid configuration. The\nfollowing expansions are understood:\n\nTable 1. Specifiers available\n+----------+---------------------+------------------------+\n|Specifier | Meaning             | Details                |\n+----------+---------------------+------------------------+\n|\"%a\"      | Architecture        | A short string         |\n|          |                     | identifying the        |\n|          |                     | architecture of the    |\n|          |                     | local system. A        |\n|          |                     | string such as x86,    |\n|          |                     | x86-64 or arm64.       |\n|          |                     | See the                |\n|          |                     | architectures          |\n|          |                     | defined for            |\n|          |                     | ConditionArchitecture= |\n|          |                     | in systemd.unit(5)     |\n|          |                     | for a full list.       |\n+----------+---------------------+------------------------+\n|\"%A\"      | Operating system    | The operating system   |\n|          | image version       | image version          |\n|          |                     | identifier of the      |\n|          |                     | running system, as     |\n|          |                     | read from the          |\n|          |                     | IMAGEVERSION= field   |\n|          |                     | of /etc/os-release. If |\n|          |                     | not set, resolves to   |\n|          |                     | an empty string. See   |\n|          |                     | os-release(5) for more |\n|          |                     | information.           |\n+----------+---------------------+------------------------+\n|\"%b\"      | Boot ID             | The boot ID of the     |\n|          |                     | running system,        |\n|          |                     | formatted as string.   |\n|          |                     | See random(4) for more |\n|          |                     | information.           |\n+----------+---------------------+------------------------+\n|\"%B\"      | Operating system    | The operating system   |\n|          | build ID            | build identifier of    |\n|          |                     | the running system, as |\n|          |                     | read from the          |\n|          |                     | BUILDID= field of     |\n|          |                     | /etc/os-release. If    |\n|          |                     | not set, resolves to   |\n|          |                     | an empty string. See   |\n|          |                     | os-release(5) for more |\n|          |                     | information.           |\n+----------+---------------------+------------------------+\n|\"%C\"      | System or user      | In --user mode, this   |\n|          | cache directory     | is the same as         |\n|          |                     | $XDGCACHEHOME, and   |\n|          |                     | /var/cache otherwise.  |\n+----------+---------------------+------------------------+\n|\"%g\"      | User group          | This is the name of    |\n|          |                     | the group running the  |\n|          |                     | command. In case of    |\n|          |                     | the system instance    |\n|          |                     | this resolves to       |\n|          |                     | \"root\".                |\n+----------+---------------------+------------------------+\n|\"%G\"      | User GID            | This is the numeric    |\n|          |                     | GID of the group       |\n|          |                     | running the command.   |\n|          |                     | In case of the system  |\n|          |                     | instance this resolves |\n|          |                     | to 0.                  |\n+----------+---------------------+------------------------+\n|\"%h\"      | User home directory | This is the home       |\n|          |                     | directory of the user  |\n|          |                     | running the command.   |\n|          |                     | In case of the system  |\n|          |                     | instance this resolves |\n|          |                     | to \"/root\".            |\n+----------+---------------------+------------------------+\n|\"%H\"      | Host name           | The hostname of the    |\n|          |                     | running system.        |\n+----------+---------------------+------------------------+\n|\"%l\"      | Short host name     | The hostname of the    |\n|          |                     | running system,        |\n|          |                     | truncated at the first |\n|          |                     | dot to remove any      |\n|          |                     | domain component.      |\n+----------+---------------------+------------------------+\n|\"%L\"      | System or user log  | In --user mode, this   |\n|          | directory           | is the same as         |\n|          |                     | $XDGCONFIGHOME with  |\n|          |                     | /log appended, and     |\n|          |                     | /var/log otherwise.    |\n+----------+---------------------+------------------------+\n|\"%m\"      | Machine ID          | The machine ID of the  |\n|          |                     | running system,        |\n|          |                     | formatted as string.   |\n|          |                     | See machine-id(5) for  |\n|          |                     | more information.      |\n+----------+---------------------+------------------------+\n|\"%M\"      | Operating system    | The operating system   |\n|          | image identifier    | image identifier of    |\n|          |                     | the running system, as |\n|          |                     | read from the          |\n|          |                     | IMAGEID= field of     |\n|          |                     | /etc/os-release. If    |\n|          |                     | not set, resolves to   |\n|          |                     | an empty string. See   |\n|          |                     | os-release(5) for more |\n|          |                     | information.           |\n+----------+---------------------+------------------------+\n|\"%o\"      | Operating system ID | The operating system   |\n|          |                     | identifier of the      |\n|          |                     | running system, as     |\n|          |                     | read from the ID=      |\n|          |                     | field of               |\n|          |                     | /etc/os-release. See   |\n|          |                     | os-release(5) for more |\n|          |                     | information.           |\n+----------+---------------------+------------------------+\n|\"%S\"      | System or user      | In --user mode, this   |\n|          | state directory     | is the same as         |\n|          |                     | $XDGCONFIGHOME, and  |\n|          |                     | /var/lib otherwise.    |\n+----------+---------------------+------------------------+\n|\"%t\"      | System or user      | In --user mode, this   |\n|          | runtime directory   | is the same            |\n|          |                     | $XDGRUNTIMEDIR, and  |\n|          |                     | /run/ otherwise.       |\n+----------+---------------------+------------------------+\n|\"%T\"      | Directory for       | This is either /tmp or |\n|          | temporary files     | the path \"$TMPDIR\",    |\n|          |                     | \"$TEMP\" or \"$TMP\" are  |\n|          |                     | set to. (Note that the |\n|          |                     | directory may be       |\n|          |                     | specified without a    |\n|          |                     | trailing slash.)       |\n+----------+---------------------+------------------------+\n|\"%u\"      | User name           | This is the name of    |\n|          |                     | the user running the   |\n|          |                     | command. In case of    |\n|          |                     | the system instance    |\n|          |                     | this resolves to       |\n|          |                     | \"root\".                |\n+----------+---------------------+------------------------+\n|\"%U\"      | User UID            | This is the numeric    |\n|          |                     | UID of the user        |\n|          |                     | running the command.   |\n|          |                     | In case of the system  |\n|          |                     | instance this resolves |\n|          |                     | to 0.                  |\n+----------+---------------------+------------------------+\n|\"%v\"      | Kernel release      | Identical to uname -r  |\n|          |                     | output.                |\n+----------+---------------------+------------------------+\n|\"%V\"      | Directory for       | This is either         |\n|          | larger and          | /var/tmp or the path   |\n|          | persistent          | \"$TMPDIR\", \"$TEMP\" or  |\n|          | temporary files     | \"$TMP\" are set to.     |\n|          |                     | (Note that the         |\n|          |                     | directory may be       |\n|          |                     | specified without a    |\n|          |                     | trailing slash.)       |\n+----------+---------------------+------------------------+\n|\"%w\"      | Operating system    | The operating system   |\n|          | version ID          | version identifier of  |\n|          |                     | the running system, as |\n|          |                     | read from the          |\n|          |                     | VERSIONID= field of   |\n|          |                     | /etc/os-release. If    |\n|          |                     | not set, resolves to   |\n|          |                     | an empty string. See   |\n|          |                     | os-release(5) for more |\n|          |                     | information.           |\n+----------+---------------------+------------------------+\n|\"%W\"      | Operating system    | The operating system   |\n|          | variant ID          | variant identifier of  |\n|          |                     | the running system, as |\n|          |                     | read from the          |\n|          |                     | VARIANTID= field of   |\n|          |                     | /etc/os-release. If    |\n|          |                     | not set, resolves to   |\n|          |                     | an empty string. See   |\n|          |                     | os-release(5) for more |\n|          |                     | information.           |\n+----------+---------------------+------------------------+\n|\"%%\"      | Single percent sign | Use \"%%\" in place of   |\n|          |                     | \"%\" to specify a       |\n|          |                     | single percent sign.   |\n+----------+---------------------+------------------------+\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Example 1. Create directories with specific mode and ownership\n\nscreen(1), needs two directories created at boot with specific modes\nand ownership:\n\n# /usr/lib/tmpfiles.d/screen.conf\nd /run/screens  1777 root screen 10d\nd /run/uscreens 0755 root screen 10d12h\n\nContents of /run/screens and /run/uscreens will be cleaned up after 10\nand 101/2 days, respectively.\n\nExample 2. Create a directory with a SMACK attribute\n\nD /run/cups - - - -\nt /run/cups - - - - security.SMACK64=printing user.attr-with-spaces=\"foo bar\"\n\nThe directory will be owned by root and have default mode. Its contents\nare not subject to time based cleanup, but will be obliterated when\nsystemd-tmpfiles --remove runs.\n\nExample 3. Create a directory and prevent its contents from cleanup\n\nabrt(1), needs a directory created at boot with specific mode and\nownership and its content should be preserved from the automatic\ncleanup applied to the contents of /var/tmp:\n\n# /usr/lib/tmpfiles.d/tmp.conf\nd /var/tmp 1777 root root 30d\n\n# /usr/lib/tmpfiles.d/abrt.conf\nd /var/tmp/abrt 0755 abrt abrt -\n\nExample 4. Apply clean up during boot and based on time\n\n# /usr/lib/tmpfiles.d/dnf.conf\nr! /var/cache/dnf/*/*/downloadlock.pid\nr! /var/cache/dnf/*/*/metadatalock.pid\nr! /var/lib/dnf/rpmdblock.pid\ne  /var/cache/dnf/ - - - 30d\n\nThe lock files will be removed during boot. Any files and directories\nin /var/cache/dnf/ will be removed after they have not been accessed in\n30 days.\n\nExample 5. Empty the contents of a cache directory on boot\n\n# /usr/lib/tmpfiles.d/krb5rcache.conf\ne! /var/cache/krb5rcache - - - 0\n\nAny files and subdirectories in /var/cache/krb5rcache/ will be removed\non boot. The directory will not be created.\n\n/RUN/ AND /VAR/RUN/\n/var/run/ is a deprecated symlink to /run/, and applications should use\nthe latter.  systemd-tmpfiles will warn if /var/run/ is used.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "systemd(1), systemd-tmpfiles(8), systemd-delta(1), systemd.exec(5),\nattr(5), getfattr(1), setfattr(1), setfacl(1), getfacl(1), chattr(1),\nbtrfs-subvolume(8), btrfs-qgroup(8)\n",
                "subsections": []
            },
            "NOTES": {
                "content": "1. Notes on Resolvability of User and Group Names\nhttps://systemd.io/UIDS-GIDS/#notes-on-resolvability-of-user-and-group-names\n\nsystemd 249                                                      TMPFILES.D(5)",
                "subsections": []
            }
        }
    }
}