I have an application that prints errors on stderr. I can redirect that output to a file with
app 2> log.txt
(Un)fortunately I log tons of information. I'd like log.txt to not grow too much, or it will break my tiny ramdisk. Is there any way to have some kind of rotating log like this?
In my ideal scenario, log.txt will always be of 100kb size, containing latest output only.
I know that POSIX systems are all pipes and filters and I figured that it is something a lot of people would want to do so is there some way to do this with basic linux commands? I say basic because I can't really rely on packages since I'm on an arm9 system and cross compiling is sometimes difficult.
On a sidenote, I don't have cron on my system =(