http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/tail.c
well, there you go, the best possible implementation of tail! :bowtie: