Access Last Mail Only (redhat)

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question
















  • 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















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?







share|improve this question
















  • 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













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?







share|improve this question












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?









share|improve this question











share|improve this question




share|improve this question










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













  • 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











1 Answer
1






active

oldest

votes

















up vote
0
down vote













Try using mailx: Type mail and then $ to read your last mail message.






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    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






























    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.






    share|improve this answer


























      up vote
      0
      down vote













      Try using mailx: Type mail and then $ to read your last mail message.






      share|improve this answer
























        up vote
        0
        down vote










        up vote
        0
        down vote









        Try using mailx: Type mail and then $ to read your last mail message.






        share|improve this answer














        Try using mailx: Type mail and then $ to read your last mail message.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 5 at 18:45









        Jeff Schaller

        31.2k846105




        31.2k846105










        answered Mar 5 at 17:58









        L.Ray

        1967




        1967






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay