Artificial intelligent assistant

Turn off mail notification in terminal I'm running some cron jobs on my machine and every time I fire up a terminal session I'm getting a 'You have mail' message (the job produces output on success which gets mailed to me). Any way to turn this notification off?

The exact mechanism depends on what shell is running in the "terminal session". For the BASH shell, the man page for "bash" says:


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.


so setting `MAILCHECK=-1` in your `.bashrc` file would do it. Other shells have man pages with similar advice. (My `bash 5.0.17` refuses to let me set the variable to a non-integer unless I first `unset` it, so the man page is incomplete about using "not a number".)

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d8e1c1465dffd889d182c7da36d00fda