TAIL(1plan9)
πΈ TAIL β the last-part-of-a-file delivery service π
okay bestie, this is tail from the Plan 9 manual, section 1. she delivers the last part of a file. that's the whole job. she's an icon, she's efficient, she eats. β¨
β¨ SYNOPSIS β¨
tail [ +-number[lbc][rf] ] [ file ]
tail [ -fr ] [ -n nlines ] [ -c nbytes ] [ file ]
two whole ways to summon her. pick your fighter. π«Ά
π DESCRIPTION π
okay so. tail copies the named file over to the standard output, starting from a designated place. no file named? then she just copies the standard input instead. lowkey flexible of her.
copying begins at position +number measured from the beginning, or -number from the end of the input. and number is counted in lines, 1K blocks, or bytes, according to the appended flag β l, b, or c. and if you don't say? the default is -10l (ten ell, as in ten lines, bestie).
the r flag? she prints lines from the end of the file in reverse order. dramatic. love that for her. and f (follow) means that after she's done printing to the end, she keeps watch and prints further data as it appears. she is not leaving. she's staying. main character energy fr fr. π
and the second syntax up there is the one POSIX put out into the world, where the numbers β not the options β are the ones that are signed. iykyk. π
π EXAMPLES π
tail fileβ print the last 10 lines of a file. simple. iconic.tail +0f fileβ print a file, and keep watching data accumulate as it grows. she's glued to it. obsessed.sed 10q fileβ print the first 10 lines of a file. yes this is a different tool, yes she's still slaying, no we're not gatekeeping. π
π SOURCE π
/src/cmd/tail.c
that's where she lives. that's her address. don't be weird about it. π
π BUGS π
heads up babes, there are some things you gotta know.
- tails relative to the end of the file are treasured up in a buffer, and thus are limited in length. so if your file is huge and you're asking for the tail end of it, she can only hold so much. π
- according to custom, the option
+numbercounts lines from 1, and counts blocks and bytes from 0. yes it's inconsistent. yes it's tradition. we don't make the rules. π - tail is ignorant of UTF. she does not know her unicode. she does not see the characters. she simply counts. do with that information what you will. π¦
okay that's the whole page!! this was TAIL(1plan9) from the Plan 9 manual β go forth and read the ends of files responsibly, bestie. mwah. πβ¨π
π¦ where this page comes from
- debian bookworm: 9base 1:6-13 Β· Lucent
- debian trixie: 9base 1:6-14 Β· Lucent
- ubuntu jammy: 9base 1:6-11 Β· Lucent
- ubuntu noble: 9base 1:6-14 Β· Lucent
- ubuntu questing: 9base 1:6-15
- ubuntu resolute: 9base 1:6-15build1 Β· Lucent
- ubuntu stonking: 9base 1:6-15build1 Β· Lucent
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms