Skip to main content

Timeline for answer to Log rotation of stdout? by Nazar

Current License: CC BY-SA 3.0

Post Revisions

10 events
when toggle format what by license comment
Dec 15, 2015 at 20:55 comment added Nick @David Richerby- how about adding -u for unbuffered?
Jun 16, 2015 at 18:44 comment added Nazar All tools have their use.. I don't think anything that works with pipes will "guarantee" no data loss. This is quick and dirty solution that would work just fine for lots of jobs. Also "split" has option to split by number of lines (instead of number of bytes). It's a good-old unix tool which I think still has it's uses.
Jun 11, 2015 at 19:28 comment added David Richerby This isn't a particualrly good solution to the problem because it means you can end up with half a message in one file and half in the next. There's also the risk of data loss if the machine crashes while split has data in what could be a large buffer. Given that there are multiple tools that solve this problem properly, I don't think this kind of roll-your-own solution can be at all recommended.
Jun 11, 2015 at 19:17 comment added fixer1234 The 1G is an arbitrary size, after which it starts a new file?
Jun 11, 2015 at 18:49 comment added Nazar just updated my reply with example.
Jun 11, 2015 at 18:44 review Late answers
Jun 11, 2015 at 19:28
Jun 11, 2015 at 18:34 history edited Nazar CC BY-SA 3.0
added 135 characters in body
Jun 11, 2015 at 18:32 review First posts
Jun 11, 2015 at 20:11
Jun 11, 2015 at 18:30 comment added fixer1234 Can you expand your answer to describe how to do that? Thanks.
Jun 11, 2015 at 18:28 history answered Nazar CC BY-SA 3.0