On Thu, Jun 13, 2024 at 12:00:25PM +0200, Frank Van Damme wrote: > Is there a way to apply max lifetimes to files matching a pattern? I can't > find any way to tell it to, say, remove *.txt files older than a month from > /tmp/foo.
If you're willing to turn away from systemd, find(1) can do this. find /tmp/foo -type f -iname '*.txt' -mtime +31 -delete