对于一些命令的操作,会有You have new mail.的一些操作,我遇到这些情况都是一些报错的情况出现。
那么怎么来进行管理这些所谓的mail呢。
在命令行中输入mail直接可以显示出来所有的mail:
yangchuang@yangdeMacBook-Pro-2 mail % mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/yangchuang": 8 messages 8 new
>N 1 yangchuang@yangdeMac Tue Mar 31 10:00 19/828 "Cron <yangchuang@yang"
N 2 yangchuang@yangdeMac Tue Mar 31 14:00 22/1039 "Cron <yangchuang@yang"
N 3 yangchuang@yangdembp Tue Mar 31 18:00 66/4620 "Cron <yangchuang@yang"
N 4 yangchuang@yangdeMac Thu Apr 2 10:00 18/962 "Cron <yangchuang@yang"
N 5 yangchuang@yangdembp Thu Apr 2 14:30 18/940 "Cron <yangchuang@yang"
N 6 yangchuang@yangdeMac Thu Apr 2 18:00 18/963 "Cron <yangchuang@yang"
N 7 yangchuang@yangdeMac Fri Apr 3 18:00 18/963 "Cron <yangchuang@yang"
N 8 yangchuang@yangdeMac Sat Apr 4 10:00 18/962 "Cron <yangchuang@yang"
每个邮件的第二行是标号,可以根据这个进行删除
查看邮件详情
直接输入前边的输入即可
? 4
Message 4:
From yangchuang@yangdeMacBook-Pro-2.local Sat Apr 4 10:00:01 2020
X-Original-To: yangchuang
Delivered-To: yangchuang@yangdeMacBook-Pro-2.local
From: yangchuang@yangdeMacBook-Pro-2.local (Cron Daemon)
To: yangchuang@yangdeMacBook-Pro-2.local
Subject: Cron <yangchuang@yangdeMacBook-Pro-2> /usr/local/bin/python3 /Users/yangchuang/Desktop/translation/num.py
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=yangchuang>
X-Cron-Env: <USER=yangchuang>
Date: Sat, 4 Apr 2020 10:00:00 +0800 (CST)
/Library/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/yangchuang/Desktop/translation/num.py': [Errno 1] Operation not permitted
删除邮件
- d 1 删除标号为1的邮件;
- d 2-4 删除标号2到4的邮件;
退出的时候需要注意,一定要用 q 命令来保存之前的操作。
q
退出mail命令平台,保存之前的操作,比如删除已用d删除的邮件,已阅读邮件会转存到当前用户家目录下的mbox文件中。如果在mbox中删除文件才会彻底删除。
x
退出mail命令平台,并不保存之前的操作,比如删除邮件
网友评论