tmpfiles: add --dry-run, to show what would be run

There was no way to see what the tmpfiles.d files on a system amount
to, short of running them:

    tmpfiles --dry-run --create --remove --boot

With -n or --dry-run each entry that would be run is printed, with
what would be done, remove, clean, or create, in the order it would
be.  Nothing is changed.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 19:10:04 +01:00
1 parent a27c0d40f3
commit ddb4f18fa9
5 files changed
+47 -5

No files matched your search

+5 -4
View File
@@ -13,16 +13,17 @@ files or common packages already rely on, last what few will miss.
* `C+`, which is read as `C`
* `z` and `Z` only set the SELinux label when `restorecon` is installed
* Modifiers `-` (do not fail), `=` (remove what is of another type),
`~` (base64 argument), and `^` (credential as argument)
* Modifiers `=` (remove what is of another type), `~` (base64
argument), and `^` (credential as argument). `-` (do not fail) has
nothing to do, tmpfiles never exits with an error for an entry
* Quoted paths, a path with a space in it cannot be written
2. Command line
---------------
Missing options: `--root`, `--replace`, `--dry-run`, `--purge`,
`--graceful`, and `--cat-config`.
Missing options: `--root`, `--replace`, `--purge`, `--graceful`, and
`--cat-config`.
3. Smaller things