Faruque Ahmed : MCP, MCSA, MCSE, MCTS, MCIT, CCNA, OCA, OCP, GCP
Type the following yum command on a CentOS/RHEL to install the same:
sudo yum install mailx
Use the following dnf command on a Fedora Linux to install it:
sudo dnf install mailx
Try the following apt command/apt-get command on an Ubuntu or Debian system:
sudo apt install mailutils
Simply type the following command:
OR
mailx
Simply type the following command at shell prompt to delete all root mail:
> /var/spool/mail/root
Verify it with the following command or cat command or ls command:
cat /var/spool/mail/root
ls -l /var/spool/mail/root
Simply run the following cron job:
@daily > /var/spool/mail/root