LOGTAIL(8)
π 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,
logtailsimply 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. πβ¨
π¦ where this page comes from
- alpine 3.22: logcheck-doc 1.4.3-r4 Β· GPL-2.0-or-later
- alpine 3.23: logcheck-doc 1.4.5-r0 Β· GPL-2.0-or-later
- alpine 3.24: logcheck-doc 1.4.7-r0 Β· GPL-2.0-or-later
- debian bookworm: logtail 1.4.2+deb12u1 Β· GPL-2.0-only
- debian trixie: logtail 1.4.5+deb13u1 Β· GPL-2.0-only
- fedora 43: logcheck 1.3.23-1.fc43 Β· GPL-2.0-only
- ubuntu jammy: logtail 1.3.23
- ubuntu noble: logtail 1.4.3 Β· GPL-2.0-only
- ubuntu questing: logtail 1.4.5
- ubuntu resolute: logtail 1.4.7build1 Β· GPL-2.0-only
- ubuntu stonking: logtail 1.4.7build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms