How to get rid of mail message?
Keith
keith at caramail.com
Fri Feb 25 18:35:31 UTC 2022
On 2/25/22 12:00 PM, Bo Berglund wrote:
> On Fri, 25 Feb 2022 17:04:05 +0000, Colin Law <clanlaw at gmail.com> wrote:
>
>>>> This is it I think. It is just a matter of redirecting the output to
>>>> null in the cron command.
>>>> https://www.cyberciti.biz/faq/disable-the-mail-alert-by-crontab-command/
>>>>
>>>
>>> THanks!
>>> I will try this. Easy for cron jobs but harder for scripts started by at...
>>> There are a lot of scripts involved, do I have to edit all of them to redirect
>>> the output?
>>> The at commands are pretty complex (generated by another script) but I will have
>>> a look at it.
>>
>> If you redirect a script output doesn't it propagate down?
>>
>
> Well I have a script that downloads videos internally using ffmpeg and ffmpeg
> spews out stuff while it is working. But I also have other smaller scripts that
> are called from the main script and they have user feedback output which I put
> there just for convenience when I use them manually. Such as audio/video resync
> utility which works for a while with ffmpeg too and then outputs a success
> message. This is visible in the "mail".
>
> So should the script that creates the at jobs be modified?
> Now a typical job is created somewat like this (one line):
>
> echo "getvideostream 4080 input13.mp4 && syncaudio 0.05 input13.mp4 X && mv
> input13.mp4 ../new/2022-02-25_13PM_new_video.u.mp4" | at 13:00 today
>
> getvideostream and syncaudio are both scripts using ffmpeg and with some user
> feedback.
>
> Should I add > /dev/null 2>&1 at the end of the quoted command string above or
> to each of the internal commands separated by &&?
>
>
Edit the file /etc/pam.d/login and change the line
session optional pam_mail.so standard
to
session optional pam_mail.so nopen
Save, logout and then log back in.
See pam_mail(8) for more options
--
Keith
More information about the ubuntu-users
mailing list