터미널에 "메일이 있습니다"메시지, os X
며칠 전 터미널 창에이 메시지가 나타납니다.

그게 무슨 뜻이야? 나는 전에 그것을 본 적이 없다.그것은 xCode 봇의 메시지였습니다.

도와 주셔서 감사합니다.
아마도 시스템의 메시지 일 것입니다.터미널에 입력하십시오 :
man mail
시스템에서이 메시지를받는 방법을 확인하십시오.
또한 터미널을 시작할 때마다 "You have mail"이라는 문제가 발생했습니다.내가 발견 한 것은 이것입니다.내가 설치 한 것 (모두 확실하지 않지만 스크립트 나 Alfred Workflow와 관련된 것)은 OS X 시스템을 변경하여 터미널 bash 알림을 시작했습니다. 그 전에 Wordpress가 로컬 메일 시스템을 사용하여 메시지를 보내려고 시도한 것 같습니다. 받는 사람 주소가 잘못되어 메시지가 반송되었습니다. 반송 된 메시지는 로컬 시스템 메일받은 편지함에 끝났습니다. 터미널 (bash)은 "메일이 있습니다"라고 알려주었습니다.다음 명령을 사용하여 메일에 액세스 할 수 있습니다
mail
그러면 Mail로 시작되고 바로 거기에 저장된 메시지 목록이 표시됩니다. 첫 번째 메시지의 내용을 보려면
t
첫 번째 메시지의 내용이 전체적으로 표시됩니다.
down-arrow
키를 누르면 메시지를 아래로 스크롤하여 메시지를 모두 볼 수 있습니다.메시지의 끝으로 이동하려면
spacebar
메시지보기를 중단하려면
q
대기열에서 다음 메시지를 보려면
n
... 하나 이상의 메시지가 있다고 가정합니다. 참고 : 메일
?
명령 프롬프트 에서이 명령을 사용해야 합니다. 메시지를 보는 동안에는 작동하지 않습니다.
n
메시지를 보는 동안 누르면 정규 표현식과 관련된 오류 메시지가 표시됩니다. 따라서 메시지를 보는 중에 메시지
q
를 끝내
spacebar
려면을 누르거나 메시지 끝으로 이동 한 다음 메시지가 표시
?
되면을 누르십시오
n
.이런 방식으로 메시지 내용을 보면 메시지를 보내려고 시도한 것을 식별하는 데 도움이 될 수 있습니다.
?
프롬프트 에서 번호를 입력하여 특정 메시지를 볼 수도 있습니다 .
3
예를 들어, 세 번째 메시지의 내용이 표시됩니다 (많은 메시지가있는 경우).
?
명령 프롬프트 에서 명령을 사용하십시오.
d [message number]
당신이 그들을보고 완료되면 각 메시지를 삭제합니다. 예를 들어,
d 2
메시지 번호 2를 삭제합니다. 또는와 같은 메시지 목록을 삭제할 수 있습니다
d 1 2 5 7
. 메일 목록에 메시지 번호가 표시됩니다.모든 메시지를 삭제하려면 메일 프롬프트 (
?
)에서 명령을 사용하십시오
d *
.이 게시물에 대한 의견에 따라
q
메일을 종료하는 데 사용해야 하며 변경 사항도 저장됩니다.메일을 모두 하나의 출력으로 보려면 bash 프롬프트에서이 명령을 사용하십시오 (예 : 메일 내에서가 아니라 일반 명령 프롬프트에서).
cat /var/mail/<username>
한 번의 히트로 이메일을 모두 삭제하려면이 명령을 사용하십시오.
sudo rm /var/mail/<username>
제 특별한 경우에는 많은 메시지가있었습니다. 반송 된 메시지가 반송 된 것처럼 보입니다. 로컬 Wordpress 설치에서 전송되었습니다. 사용자 "Admin"(me)이 비밀번호를 변경했을 때의 알림입니다. 거기에 두 개의 추가 메시지가 있습니다. 둘 다 같은 사건으로 보였습니다.
What I don't know, and can't answer for you either, is WHY I only recently started seeing this mail notification each time I open Terminal. The mails were generated a couple of months ago, and yet I only noticed this "you have mail" appearing in the last few weeks. I suspect it's the result of something a workflow I installed in Alfred, and that workflow using Terminal bash to provide notifications... or something along those lines.
Simply deleting the messages
If you have no interest in determining the source of the messages, and just wish to get rid of them, it may be easier to do so without using the mail command (which can be somewhat fiddly). As pointed out by a few other people, you can use this command instead:
sudo rm /var/mail/YOURUSERNAME
If you don't want the hassle of using mail, you can read the mail with
cat /var/mail/<username>
and delete the mail with
sudo rm /var/mail/<username>
It means that a process or script you have created is sending mail to an account on your local machine (for example, a mail server running on localhost application).
Manage this mail with these commands:
t <message list> type messages
n goto and type next message
e <message list> edit messages
f <message list> give head lines of messages
d <message list> delete messages
s <message list> file append messages to file
u <message list> undelete messages
R <message list> reply to message senders
r <message list> reply to message senders and all recipients
pre <message list> make messages go back to /var/mail
m <user list> mail to specific users
q quit, saving unresolved messages in mbox
x quit, do not remove system mailbox
h print out active message headers
! shell escape
cd [directory] chdir to directory or home if none given
A consists of integers, ranges of same, or user names separated by spaces. If omitted, Mail uses the last message typed.
A consists of user names or aliases separated by spaces. Aliases are defined in .mailrc in your home directory.
As inspiredlife explained, you can figure out whats happening using mail command.
If you don't want to delete bunch of unrelated / auto-generated messages one by one (like me), simply run the command below to get rid of all messages:
echo -n > /var/mail/yourusername
참고URL : https://stackoverflow.com/questions/22163102/you-have-mail-message-in-terminal-os-x
'Programming' 카테고리의 다른 글
| PHP 배열의 값을 지우는 가장 좋은 방법 (0) | 2020.06.04 |
|---|---|
| Bash에서 날짜 (현재 시간 전날)를 가져옵니다. (0) | 2020.06.04 |
| OS X v10.7 (Lion)에 autoreconf를 설치 하시겠습니까? (0) | 2020.06.04 |
| PHP에서 전역 변수를 선언하는 방법은 무엇입니까? (0) | 2020.06.04 |
| 범주 형 변수 차트에서 개수 대신 % 표시 (0) | 2020.06.04 |