Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #270078

Re: systemd-tmpfiles: file globbing?

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: systemd-tmpfiles: file globbing?
Date 2024-06-13 14:10 +0200
Message-ID <IORrb-2EpQ-3@gated-at.bofh.it> (permalink)
References <IOPIK-2D39-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

systemd-tmpfiles: file globbing? Frank Van Damme <frank.vandamme@gmail.com> - 2024-06-13 12:20 +0200
  Re: systemd-tmpfiles: file globbing? Greg Wooledge <greg@wooledge.org> - 2024-06-13 14:10 +0200

csiph-web