biff
Notify user of incoming mail
TLDR
Print the current time in a format of your choosing
Print multiple relative times in one command
Print the current time in another time zone, and round it the nearest 15 minute increment
Convert a time between two different time zone
Print a past or future time relative to current time
Add a complex duration to the current time
Find the duration since a date in the past and round it to the desired precision
Find timestamps in a log file and reformat them into your local time in place
SYNOPSIS
biff [y | n]
PARAMETERS
y
Enables mail notification. This tells the comsat daemon to notify you when new mail arrives.
n
Disables mail notification. This stops comsat from sending mail alerts to your terminal.
DESCRIPTION
biff is a traditional Unix command-line utility designed to provide immediate notifications of new incoming mail. When enabled, it monitors the user's mailbox file for changes. Upon the arrival of a new email, biff prints the mail header and the first few lines of the message directly to the user's terminal, interrupting whatever they might be doing. This functionality relies on the comsat (or biff-server) daemon, which actively watches mailboxes and sends notifications. While once a popular feature for system administrators and power users on text-based terminals, biff has largely been superseded by modern graphical mail clients and notification systems that offer richer and less intrusive ways to manage email alerts. It remains available primarily for historical compatibility or in minimalist console environments.
CAVEATS
biff requires the comsat (or biff-server) daemon to be running on the system to function correctly. Without comsat, biff will not be able to provide notifications.
Notifications are printed directly to the terminal, which can be disruptive, especially if you are in the middle of editing a file or running another command.
In modern desktop environments, graphical mail clients and notification systems offer more integrated and less intrusive mail alerts, making biff less relevant for most users.
Printing mail headers and content directly to the terminal could potentially expose sensitive information to shoulder-surfers or in screen recordings.
It primarily works for local mailboxes, not typically for remote IMAP/POP3 accounts without specific server-side integration.
<B>HOW <B>BIFF</B> WORKS</B>
When you execute biff y, the biff client program sends a UDP datagram to the comsat server, typically on port 512 (biff/comsat service). This datagram includes your terminal device name. The comsat daemon then adds your terminal to its list of devices to notify. When comsat detects new mail in your mailbox file (e.g., /var/mail/$USER), it reads the mailbox, formats the notification (header and first few lines), and attempts to write this information directly to the specified terminal using write(2) or similar low-level system calls, bypassing the shell.
<B>MODERN RELEVANCE</B>
In contemporary computing environments, biff is rarely used by the average user. Modern email clients like Thunderbird, Outlook, or webmail interfaces provide rich, configurable, and often non-intrusive notifications (e.g., pop-up alerts, sound notifications, tray icons) that are far more suitable for desktop use. biff's primary utility now lies in niche scenarios, such as very minimalist console-only setups, for historical interest, or by system administrators who prefer a traditional Unix toolset.
HISTORY
biff is a venerable command tracing its origins back to early Unix systems, particularly BSD. It was designed to address the need for immediate mail notification in a time when users typically worked on text-based terminals and didn't have graphical interfaces or persistent mail clients. The command is named after a dog belonging to the developer who created it. Its reliance on the comsat (or biff-server) daemon dates back to these early implementations, where comsat would monitor /var/mail or ~/Mailbox and broadcast mail arrival information. While widely used in the 1980s and 1990s, its prominence waned with the advent of graphical user interfaces and sophisticated email clients, which offer more advanced and user-friendly notification mechanisms. Despite this, biff remains a testament to the ingenuity of early Unix developers and is still found on many systems for backward compatibility.