Access Last Mail Only (redhat)
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm working on a redhat server with a lot of cron jobs. What I have been doing is cat var/spool/mail/uname
. However, the size of it is constantly growing and causes me to lose previous console stuff from earlier.
Is there an alternative to the naive cat
that will allow me to only print the most recent mail?
rhel email
add a comment |Â
up vote
0
down vote
favorite
I'm working on a redhat server with a lot of cron jobs. What I have been doing is cat var/spool/mail/uname
. However, the size of it is constantly growing and causes me to lose previous console stuff from earlier.
Is there an alternative to the naive cat
that will allow me to only print the most recent mail?
rhel email
1
usually folks use a mail reader (e.g.mutt
) to look at mails. another option would be to eliminate what I call cron spam so there are not a bazillion mails to read
â thrig
Mar 5 at 14:58
... or fix the cron jobs to do proper logging and to not spew thing onto standard output or standard error.
â Kusalananda
Mar 5 at 15:14
Is the mail folder I specified the same as "standard output"? This is my first time with Cron, IâÂÂm not the dba, and it appears to be happening automatically. Mutt looks like a good solution
â Mike Palmice
Mar 5 at 15:15
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm working on a redhat server with a lot of cron jobs. What I have been doing is cat var/spool/mail/uname
. However, the size of it is constantly growing and causes me to lose previous console stuff from earlier.
Is there an alternative to the naive cat
that will allow me to only print the most recent mail?
rhel email
I'm working on a redhat server with a lot of cron jobs. What I have been doing is cat var/spool/mail/uname
. However, the size of it is constantly growing and causes me to lose previous console stuff from earlier.
Is there an alternative to the naive cat
that will allow me to only print the most recent mail?
rhel email
asked Mar 5 at 14:44
Mike Palmice
1012
1012
1
usually folks use a mail reader (e.g.mutt
) to look at mails. another option would be to eliminate what I call cron spam so there are not a bazillion mails to read
â thrig
Mar 5 at 14:58
... or fix the cron jobs to do proper logging and to not spew thing onto standard output or standard error.
â Kusalananda
Mar 5 at 15:14
Is the mail folder I specified the same as "standard output"? This is my first time with Cron, IâÂÂm not the dba, and it appears to be happening automatically. Mutt looks like a good solution
â Mike Palmice
Mar 5 at 15:15
add a comment |Â
1
usually folks use a mail reader (e.g.mutt
) to look at mails. another option would be to eliminate what I call cron spam so there are not a bazillion mails to read
â thrig
Mar 5 at 14:58
... or fix the cron jobs to do proper logging and to not spew thing onto standard output or standard error.
â Kusalananda
Mar 5 at 15:14
Is the mail folder I specified the same as "standard output"? This is my first time with Cron, IâÂÂm not the dba, and it appears to be happening automatically. Mutt looks like a good solution
â Mike Palmice
Mar 5 at 15:15
1
1
usually folks use a mail reader (e.g.
mutt
) to look at mails. another option would be to eliminate what I call cron spam so there are not a bazillion mails to readâ thrig
Mar 5 at 14:58
usually folks use a mail reader (e.g.
mutt
) to look at mails. another option would be to eliminate what I call cron spam so there are not a bazillion mails to readâ thrig
Mar 5 at 14:58
... or fix the cron jobs to do proper logging and to not spew thing onto standard output or standard error.
â Kusalananda
Mar 5 at 15:14
... or fix the cron jobs to do proper logging and to not spew thing onto standard output or standard error.
â Kusalananda
Mar 5 at 15:14
Is the mail folder I specified the same as "standard output"? This is my first time with Cron, IâÂÂm not the dba, and it appears to be happening automatically. Mutt looks like a good solution
â Mike Palmice
Mar 5 at 15:15
Is the mail folder I specified the same as "standard output"? This is my first time with Cron, IâÂÂm not the dba, and it appears to be happening automatically. Mutt looks like a good solution
â Mike Palmice
Mar 5 at 15:15
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
Try using mailx: Type mail
and then $
to read your last mail message.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Try using mailx: Type mail
and then $
to read your last mail message.
add a comment |Â
up vote
0
down vote
Try using mailx: Type mail
and then $
to read your last mail message.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Try using mailx: Type mail
and then $
to read your last mail message.
Try using mailx: Type mail
and then $
to read your last mail message.
edited Mar 5 at 18:45
Jeff Schaller
31.2k846105
31.2k846105
answered Mar 5 at 17:58
L.Ray
1967
1967
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428283%2faccess-last-mail-only-redhat%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
usually folks use a mail reader (e.g.
mutt
) to look at mails. another option would be to eliminate what I call cron spam so there are not a bazillion mails to readâ thrig
Mar 5 at 14:58
... or fix the cron jobs to do proper logging and to not spew thing onto standard output or standard error.
â Kusalananda
Mar 5 at 15:14
Is the mail folder I specified the same as "standard output"? This is my first time with Cron, IâÂÂm not the dba, and it appears to be happening automatically. Mutt looks like a good solution
â Mike Palmice
Mar 5 at 15:15