This small tool copies the content of its standard input into daily switching files.
This allows the user to split the output of a long-time running command into daily (or other duration) files.
It can be easily used on command line, in a much simpler way than logrotate.
License GPLv3+: GNU GPL version 3 or later. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Copyright 2017 Christophe Blaess.
You can install the project with CMake:
$ git clone https://github.com/cpb-/dailyfile
$ mkdir build
$ cd build
$ cmake ../dailyfile
$ make
$ sudo make install
or with the provided Makefile:
$ git clone https://github.com/cpb-/dailyfile
$ cd dailyfile
$ make clean
$ make
$ sudo make install
$ dailyfile [options]
-b, --buffer-size=SIZEUse a specific buffer size for the copy.-c, --cycle=SECONDSCycle duration for switching files.-d, --directory=DIRSave the files into the given directory.-h, --helpDisplay this help screen and quit.-l, --localtimeUse localtime for filenames instead of G.M.Time.-p, --prefix=STRINGUse the given prefix for filenames instead of "day-".-s, --suffix=STRINGUse the given suffix for filenames instead of ".log".-v, --versionDisplay version informations.
Default filenames are day-YYYY-MM-DD.log if cycle duration is longer than a day
and day-YYYY-MM-DD-hh-mm-ss.log if cycle is shorter than a day.
$ some-long-time-running-command | dayfile