Need help with: Clearing logs with bash script

@JBr Just a thought… have you considered lowering the logging level down. You can make Openhab log less information

Levels are Debug, Error, Warning, Info etc…

I lowered mine down and a month later, the log files barely 1-2 megabytes in size.. and obviously I turn it back up if I need to debug errors. But this could be another way to tackle data sprawl/disk space if thats your concern. FYI.. this is what I set mine to (I cant remember what the defaults are, so this may give you the comparison to figure that).

Logger │ Level
───────────────────────────────────────────────────┼──────
ROOT │ WARN
javax.jmdns │ ERROR
javax.mail │ ERROR
org.apache.karaf.jaas.modules.audit │ INFO
org.apache.karaf.kar.internal.KarServiceImpl │ ERROR
org.apache.karaf.shell.ssh.SshUtils │ ERROR
org.apache.karaf.shell.support │ OFF
org.eclipse.lsp4j │ OFF
org.eclipse.smarthome │ INFO
org.jupnp │ ERROR
org.openhab │ INFO
org.openhab.ui.paper │ WARN
org.openhab.ui.paper.internal │ INFO
org.ops4j.pax.url.mvn.internal.AetherBasedResolver │ ERROR
org.ops4j.pax.web.pax-web-runtime │ OFF
smarthome.event │ WARN
smarthome.event.InboxUpdatedEvent │ ERROR
smarthome.event.ItemAddedEvent │ ERROR
smarthome.event.ItemRemovedEvent │ ERROR
smarthome.event.ItemStateEvent │ ERROR
smarthome.event.ThingAddedEvent │ ERROR
smarthome.event.ThingRemovedEvent │ ERROR
smarthome.event.ThingStatusInfoEvent │ ERROR