public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter J. Holzer <[email protected]>
To: [email protected]
Subject: Re: Log retention query
Date: Sun, 2 Feb 2025 20:57:13 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAFeSbqjnRXNZ72NdD+G6ScKKBTQXAxpMk=XyH1sPGs+L2atF_A@mail.gmail.com>
<[email protected]>
<CAFeSbqjqi1DZjQDatiZehk3GpkX_dFv=qgfsgWxKbsACSWJv_g@mail.gmail.com>
<[email protected]>
<[email protected]>
On 2025-02-02 12:12:07 +0000, Paul Brindusa wrote:
> I had the exact same query as Junwang proposed.
Assuming that by "query" you mean the crontab entry:
Well, if if was *exactly* the same it's unlikely to work since you
probably don't have a directory literally called "/path/to/logs". If you
made the obvious substitution, it should work provided it runs with
appropriate privileges.
What is the output if you remove the «-exec rm {} \;» bit? What happens
if you reduce the mtime?
> Was mega upset that I could not get the cronjobs to work, and from what I
> can tell from @Laurenz's response above we have the names of the logs
> customised to posgtres-%d-%m-%y.
Earlier you wrote that the pattern was actually
«postgresql-%Y-%m-%d.log». «find ... -name "*.log"» would find that but
of course not «posgtres-%d-%m-%y».
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | [email protected] | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
view thread (13+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Log retention query
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox