1SYSTEMD-TMPFILES(8)            systemd-tmpfiles            SYSTEMD-TMPFILES(8)
2
3
4

NAME

6       systemd-tmpfiles, systemd-tmpfiles-setup.service, systemd-tmpfiles-
7       setup-dev.service, systemd-tmpfiles-clean.service, systemd-tmpfiles-
8       clean.timer - Creates, deletes and cleans up volatile and temporary
9       files and directories
10

SYNOPSIS

12       systemd-tmpfiles [OPTIONS...] [CONFIGFILE...]
13
14       System units:
15
16       systemd-tmpfiles-setup.service
17       systemd-tmpfiles-setup-dev.service
18       systemd-tmpfiles-clean.service
19       systemd-tmpfiles-clean.timer
20
21       User units:
22
23       systemd-tmpfiles-setup.service
24       systemd-tmpfiles-clean.service
25       systemd-tmpfiles-clean.timer
26

DESCRIPTION

28       systemd-tmpfiles creates, deletes, and cleans up volatile and temporary
29       files and directories, based on the configuration file format and
30       location specified in tmpfiles.d(5).
31
32       If invoked with no arguments, it applies all directives from all
33       configuration files. When invoked with --replace=PATH, arguments
34       specified on the command line are used instead of the configuration
35       file PATH. Otherwise, if one or more absolute filenames are passed on
36       the command line, only the directives in these files are applied. If
37       "-" is specified instead of a filename, directives are read from
38       standard input. If only the basename of a configuration file is
39       specified, all configuration directories as specified in tmpfiles.d(5)
40       are searched for a matching file and the file found that has the
41       highest priority is executed.
42

OPTIONS

44       The following options are understood:
45
46       --create
47           If this option is passed, all files and directories marked with f,
48           F, w, d, D, v, p, L, c, b, m in the configuration files are created
49           or written to. Files and directories marked with z, Z, t, T, a, and
50           A have their ownership, access mode and security labels set.
51
52       --clean
53           If this option is passed, all files and directories with an age
54           parameter configured will be cleaned up.
55
56       --remove
57           If this option is passed, the contents of directories marked with D
58           or R, and files or directories themselves marked with r or R are
59           removed.
60
61       --user
62           Execute "user" configuration, i.e.  tmpfiles.d files in user
63           configuration directories.
64
65       --boot
66           Also execute lines with an exclamation mark.
67
68       --prefix=path
69           Only apply rules with paths that start with the specified prefix.
70           This option can be specified multiple times.
71
72       --exclude-prefix=path
73           Ignore rules with paths that start with the specified prefix. This
74           option can be specified multiple times.
75
76       --root=root
77           Takes a directory path as an argument. All paths will be prefixed
78           with the given alternate root path, including config search paths.
79
80           Note that this option does not alter how the users and groups
81           specified in the configuration files are resolved. With or without
82           this option, users and groups are always resolved according to the
83           host's user and group databases, any such databases stored under
84           the specified root directories are not consulted.
85
86       --replace=PATH
87           When this option is given, one ore more positional arguments must
88           be specified. All configuration files found in the directories
89           listed in tmpfiles.d(5) will be read, and the configuration given
90           on the command line will be handled instead of and with the same
91           priority as the configuration file PATH.
92
93           This option is intended to be used when package installation
94           scripts are running and files belonging to that package are not yet
95           available on disk, so their contents must be given on the command
96           line, but the admin configuration might already exist and should be
97           given higher priority.
98
99       --cat-config
100           Copy the contents of config files to standard output. Before each
101           file, the filename is printed as a comment.
102
103       --no-pager
104           Do not pipe output into a pager.
105
106       -h, --help
107           Print a short help text and exit.
108
109       --version
110           Print a short version string and exit.
111
112       It is possible to combine --create, --clean, and --remove in one
113       invocation (in which case removal and clean-up are executed before
114       creation of new files). For example, during boot the following command
115       line is executed to ensure that all temporary and volatile directories
116       are removed and created according to the configuration file:
117
118           systemd-tmpfiles --remove --create
119

UNPRIVILEGED --CLEANUP OPERATION

121       systemd-tmpfiles tries to avoid changing the access and modification
122       times on the directories it accesses, which requires CAP_FOWNER
123       privileges. When running as non-root, directories which are checked for
124       files to clean up will have their access time bumped, which might
125       prevent their cleanup.
126

EXIT STATUS

128       On success, 0 is returned. If the configuration was syntactically
129       invalid (syntax errors, missing arguments, ...), so some lines had to
130       be ignored, but no other errors occurred, 65 is returned (EX_DATAERR
131       from /usr/include/sysexits.h). If the configuration was syntactically
132       valid, but could not be executed (lack of permissions, creation of
133       files in missing directories, invalid contents when writing to /sys/
134       values, ...), 73 is returned (EX_CANTCREAT from
135       /usr/include/sysexits.h). Otherwise, 1 is returned (EXIT_FAILURE from
136       /usr/include/stdlib.h).
137

SEE ALSO

139       systemd(1), tmpfiles.d(5)
140
141
142
143systemd 241                                                SYSTEMD-TMPFILES(8)
Impressum