Точный механизм зависит от того, какая оболочка работает в «терминальном сеансе». Для раковины Bash страница человека для «Bash» говорит:
MAILCHECK
Specifies how often (in seconds) bash checks for mail. The
default is 60 seconds. When it is time to check for mail, the
shell does so before displaying the primary prompt. If this
variable is unset, or set to a value that is not a number
greater than or equal to zero, the shell disables mail checking.
, так что настройка MailCheck = 0
в вашем .bashrc
файл сделает это. Другие раковины имеют страницы человека с аналогичным советом.
Почта, отправленная CRON, часто считается спамом и называется CRAM (CRON SPAM). Действительно, не полезно получать уведомления Каждый тайм-команда была запущена и успешна, но было бы хорошо, если Cron все еще сообщил вам о ошибках. Вы можете Cronic для этой цели:
Cronic is a small shim shell script for wrapping cron jobs so that cron
only sends email when an error has occurred. Cronic defines an error as
any non-trace error output or a non-zero result code.