LOGTAIL(8)

πŸ“¦
version 1.4.7build1 Β· 2 versions
  • 1.4.7build1 Β· alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, fedora 43, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.3.18 Β· epel 9
, in alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, fedora 43, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ‘‘ LOGTAIL β€” the logtail manual, section 8

okay bestie, gather round, because this one is a lil tool with a big job and she does it flawlessly πŸ’… the page you're reading right now is logtail(8) from the logtail manual, and honestly? she's iconic. no cap.


✨ NAME ✨

logtail β€” print log file lines that have not been read

like, she shows you the new stuff only. the freshest tea. πŸ«–


🌸 SYNOPSIS 🌸

logtail [-t] -flogfile [-ooffsetfile]

look at her, so compact. so slay. ✨


πŸ’– DESCRIPTION πŸ’–

logtail reads a specified file (usually a log file, bestie, it's literally in the name) and writes to the standard output that part of it which has not been read by previous runs of logtail. so it's giving "what did I miss while I was asleep" energy. πŸ˜΄βž‘οΈπŸ‘€

basically it prints the appropriate number of bytes from the end of logfile, assuming that all changes that are made to it are to add new characters to it. yes, that assumption is doing a lot of heavy lifting, and yes, we're rolling with it.

🚨 logfile must be a plain file. a symlink is not allowed. not even a cute little one. nope. πŸ™…β€β™€οΈ

logtail stores the information about how much of it has already been read in a separate file called offsetfile. offsetfile can be omitted β€” she's optional, she's flexible, she's lowkey doing her own thing. if omitted, the file named logfile.offset in the same directory which contains logfile is used by default. periodt. πŸ’…

now, the drama section: if offsetfile is not empty, the inode of logfile is checked. πŸ”

  • if the inode is changed, logtail simply prints the entire file. whole thing. no chill. 🌈
  • if the inode is not changed but logfile is shorter than it was at the last run of logtail, it writes a warning message to the standard output. 😭 she's concerned about you.

πŸŽ€ OPTIONS πŸŽ€

  • -f β€” logfile to be read after offset. the main character file fr fr.
  • -o β€” offsetfile stores offset of previous run. her little memory journal πŸ““
  • -t β€” test mode - do not change offset in offsetfile. just looking, not touching, we respect boundaries here. 🫢

πŸ”₯ RETURN VALUES πŸ”₯

  • 0 β€” successful. ate and left no crumbs. ✨
  • 65 β€” cannot get the size of logfile. πŸ’€
  • 66 β€” logfile does not exist, is not a plain file, or is not readable. (remember: no symlinks, bestie!)
  • 73 β€” cannot write offsetfile. 😭

πŸ’œ AUTHOR πŸ’œ

The original logtail was written in C by Craig H. Rowland <crowland@psionic.com>. This version of logtail is a Perl reimplementation by Paul Slootman <paul@debian.org>. Enhanced by the Debian Logcheck Team <logcheck@packages.debian.org>.

This manual was written by Oohara Yuuma <oohara@libra.interq.or.jp>.

shoutout to the whole group chat of legends who built this. πŸ‘‘πŸ‘‘πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole vibe check, bestie. this page ships with the Debian edition, dated Fri, 19 Nov 2004 β€” yes she's vintage, yes she still serves. πŸ’– stay logged, stay tailed, mwah. πŸŽ€βœ¨