Linux: Count Mail Sent in Past Hour

From a Linux command line is there any way to find out how many email messages have been sent by the server within the past hour?
LVL 16
hankknightAsked:
Who is Participating?
 
duncanb7Connect With a Mentor Commented:
find  /var/log/maillog  -mmin -60 |xargs grep -c "Message accepted for delivery" |wc -l

Could you try this  that I changed ?
0
 
duncanb7Commented:
find  /var/log/maillog  -mmin -60 |xargs grep -c "Message accepted for delivery" |wc -l

/var/log/maillog , mail log file may put into diff dir depend on your system



Note: for find with last hour
==============================
find srch_dir -cmin -60 # creation time

or


find srch_dir -mmin -60 # modification time
or


 find srch_dir -amin -60 # access time
0
 
duncanb7Commented:
Thanks , hava a nice day and good weekend
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.