0

The /var/spool/mail/root file was deleted by accident; I need to recover it. Is there any link related to this file or how this file got updated which script responsible for it?

1
  • 2
    what do you do for backups?
    – thrig
    Apr 12 '18 at 14:28
1

The file /var/spool/mail/root typically contains locally delivered email for the root user. For example,

echo hello, world | mail -s 'kandr test' root

If you don't have a backup then you have lost your local email for this user account. (If you didn't ever read it then consider it a safe loss.)

Don't try to recreate the file. It will be recreated automatically the next time the root user account receives a message. (You can read such messages with the mail or mailx command.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.