V
V
Venot2020-08-28 11:06:44
linux
Venot, 2020-08-28 11:06:44

How to rotate folders?

Is there a way to rotate a folder using logrotate? The meaning is a folder with the name of the application, in which a folder with a day in the calendar is created, and logs are already added in the folder. You need to delete the old days, this is how you can do a logrotate thread, or better through find ... Rm - rf?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
akelsey, 2020-08-28
@akelsey

logrotate supports wildcard in paths. Something like:
/var/log/app/*/*.log
well, you can probably bang folders already with rm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question