MOTD ⚙ CHAPTERS 01 / 05
TODAY'S QUIZ0 / 5 STREAK0 days POINTS0 THE OPERATOROpen

$man 1 tail

Ten things the page says. Every one of them is on your machine right now — run the command above and check.

  1. 01

    Print the last 10 lines of each FILE to standard output.[man]

  2. 02
    -c, --bytes=[+]NUM

    output the last NUM bytes; or use -c +NUM to output starting with byte NUM of each file.[man]

  3. 03
    -n, --lines=[+]NUM

    output the last NUM lines, instead of the last 10; or use -n +NUM to skip NUM-1 lines at the start.[man]

  4. 04
    --max-unchanged-stats=N

    with --follow=name, reopen a FILE which has not.[man]

  5. 05
    --pid=PID

    with -f, terminate after process ID, PID dies.[man]

  6. 06
    --retry

    keep trying to open a file if it is inaccessible.[man]

  7. 07
    -s, --sleep-interval=N

    with -f, sleep for approximately N seconds (default 1.0) between iterations; with inotify and --pid=P, check process P at least once every N seconds.[man]

  8. 08

    With more than one FILE, precede each with a header giving the file name.[man]

  9. 09

    With no FILE, or when FILE is -, read standard input.[man]

  10. 10

    Mandatory arguments to long options are mandatory for short options too.[man]

$run --yourself

Follow a file as it is written

-f is how you watch a log live, and +N is how you skip a header. Ctrl-C is the exit, which the page does not say plainly.

These commands write files, so run them in a scratch directory:

$ mkdir -p ~/motd-lab && cd ~/motd-lab
~/motd-lab
$ seq 1 20 > log.txt
$ tail -n 3 log.txt
$ tail -n +18 log.txt
$ (sleep 1; echo 'new line' >> log.txt) &
$ tail -f -n 1 log.txt

WHAT YOU SHOULD SEEThe last three lines, then everything from line 18 on, then tail blocks and prints 'new line' when it arrives. Press Ctrl-C to stop.

$quiz -n 5

Five questions, each one taking a term out of a line above. Ten points for each. Tap hear it to have a question read to you; answering plays the verdict.

QUESTION 1 OF 5

Which term completes this line from the page? “Print the last 10 lines of each FILE to _____ output.”

From point 1 above.

QUESTION 2 OF 5

Which term completes this line from the page? “output the last NUM _____, instead of the last 10; or use -n +NUM to skip NUM-1 lines at the start.”

From point 3 above.

QUESTION 3 OF 5

Which term completes this line from the page? “with -f, _____ after process ID, PID dies.”

From point 5 above.

QUESTION 4 OF 5

Which term completes this line from the page? “with -f, sleep for _____ N seconds (default 1.0) between iterations; with inotify and --pid=P, check process P at least once every N seconds.”

From point 7 above.

QUESTION 5 OF 5

Which term completes this line from the page? “With no FILE, or when FILE is -, read standard _____.”

From point 9 above.

Answer all five to bank your points.

$play --chapters 5

Five chapters, three voices. Tap one to jump — the player at the bottom of the screen follows.

download the full edition

$tee --everyone

Know someone with ten minutes and a terminal? Send them today's page. This is the card that appears when you post it:

Share card for tail(1): output the last part of files
2026-11-09 · 1200×630

$su - operator

The Operator has a dispatch on tail(1), and he files them for subscribers only. It is free. Join the club, or read about the series.

MOTD is a weekday reading of one manual page already installed on your own machine. Every statement is quoted from that page or from the GNU info documentation beside it, and every edition names the command that shows you the source.

archive · the operator · about · podcast · Feline Union

NARRATION · 3 VOICES · 01
Last login