ctailgnu-coreutilsgnu-fileutils

Binary "tail" a file


I would guess most people on this site are familiar with tail, if not - it provides a "follow" mode that as text is appended to the file tail will dump those characters out to the terminal.

What I am looking for (and possibly to write myself if necessary) is a version of tail that works on binary files. Basically I have a wireless link that I would like to trickle a file across as it comes down from another network link. Looking over the tail source code it wouldn't be too hard to rewrite, but I would rather not reinvent the wheel! This wouldn't strictly be "tail" as I would like the entire file to be copied, but it would watch as new bytes were added and stream those.

Ideas?


Solution

  • There is also the bintail application which appears to be more robust than the aforementioned script.

    The bintail package contains a single application, bintail. The program reads a normal file from disk, and pipes the output to stdout, byte-by-byte, with no translation, similar to what tail(1) does to text files. This is useful for "tailing" binary files, such as WAV files, while they are being written in realtime. This app is a work in progress, but it already does what it was designed to do for me.