On Tuesday, 7 March 2023 07:52:01 GMT Mickaël Bucas wrote: > Le mar. 7 mars 2023 à 05:36, Bryan Gardiner <[email protected]> a écrit : > > Hi folks, > > > > How can I follow Portage's compressed build logs in real time as they > > are generated? > > > > I keep build logs and use FEATURES=compress-build-logs so that they > > don't get too large. I can peek at how a build is going with zless on > > build.log.gz, which doesn't update (understandably), but I would > > really like to be able to watch a log with some "tail -f" equivalent. > > I get streaming output with > > > > tail -c +1 -f build.log.gz | od -t x1 > > > > but the following hangs with no output: > > tail -c +1 -f build.log.gz | gunzip > > > > even with a build log that is 72KB compressed (2.4MB uncompressed), > > which should be larger than any pipe buffers... Any idea why gunzip > > can't handle this, or what I should I should be doing instead? > > > > Thanks, > > Bryan > > Hi > > Reading the man page, "zless" is just a wrapper around "less". > You can check with: > $ file $(which zless) > /usr/bin/zless: POSIX shell script, ASCII text executable > $ less $(which zless) > > So it should support the same options including typing "F" at the end > of a file to keep trying to read when the end of file is reached. > > I made a small test, but it didn't work: > # Create a growing file > $ yes | nl | gzip > zless-test.gz & > # Try to follow at the end > $ zless zless-test.gz > > With ">" to go to the end and "F" to continue, I didn't get the > expected behavior, it stood still at the point I was viewing. > I don't know if it's really a bug or if I made a mistake... > (Don't forget to stop the growing file :) ) > > Best regards > > Mickaël Bucas
You could try: tail -c +1 -f build.log.gz | gunzip | less I think it should work, but I haven't tried it.
signature.asc
Description: This is a digitally signed message part.

