-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable extended globbing #177
Comments
I believe this could be addressed by the solution proposed in #173. If it gets implemented, you should be able to write it like this:
|
Yes, thats look fine too |
On Thursday, March 1, 2018 2:13:30 PM CET xpyy wrote:
But anyway why logrotate doesn't support extended glob?
logrotate implements globbing using glob(3), which I am not really familiar
with. So I am not sure whether it supports the syntax you ask for. Even
if it did, we would need to enable it by an option to stay compatible with
already released versions of logrotate.
|
@kdudka #5 (comment) it's a symptom of the fact that this feature is very desirable. I suggest that the best way to implement the recursive part, moreover without the need to sacrifice the backward compatibility, is to use the zsh style globbing:
This should make the use of logrotate much more convenient for everyone. :-) |
As I mentioned in another issue, I have been looking hard to do what @xpyy did and clearly this feature is very desirable indeed. Honestly, I was surprised we ran into this seemingly basic problem with logrotate. There are also no comparable alternatives to logrotate so.. you're our last hope, Obi-Wan! 😃 |
In my particular case, I haven't been able to find any sort of acceptable workaround at all. The only option is to move log files that need to be rotated on different conditions than the rest to a separate directory. Which is impractical for many reasons. |
My use case:
I have directory with many subdirectories with logs like this:
I have to rotate logs in all subdirectories 30 days except one (for example dir5) where i need 60 days. Extended globbing allow me to use something like:
Without it i found only this solution:
... which is very ugly and unintuitive
The text was updated successfully, but these errors were encountered: