"Alfred M. Szmidt" <[EMAIL PROTECTED]> writes: > Hey, > > I got this funky idea today, but I'm not sure what would be the best > way to implement it. What it would essentially do is provide a > "circular file", so when you get to the end of the file you start from > position 0. With the nice option that if you do roll over, you can > clear the all stored contents and re-start with a "blank file". > > This is very useful for if you are dumping lots of log info and you > are only interested in the last few billion lines. > > Anyway, what I'm unsure of is how you should set the actual > translator, one way which should be trivial to do is to make it act > like a "link". So you would do > > settrans -ac /log /hurd/rollover 100M /real-log > > And if you write more then 100M to /log, it would start from position > 0. That way anything beyond 100M in /real-log would be intact. > > Another way would be just to skip the whole /real-log story, and all > read/writes would happend to the underlying node. > > Well, thats all folks...
I sort of like this idea. It's similar to the problem I wanted to solve with the multiple firmlink hack I rigged up a while ago. Unfortunatly, I'm having trouble thinking off an easy way to do the what I want, i.e. I want to specify a translator the way you say above an always have the last 100M of log messages. So, the point of my incorherence is that instead of the file rolling over, I just want the file to discard anything but that last X bytes put into the file and never lose the last X bytes put into the file. -- Thanks, Jim http://www.student.cs.uwaterloo.ca/~ja2morri/ http://phython.blogspot.com http://open.nit.ca/wiki/?page=jim _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-hurd