Link to home
Start Free TrialLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

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?
Avatar of duncanb7
duncanb7

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
ASKER CERTIFIED SOLUTION
Avatar of duncanb7
duncanb7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks , hava a nice day and good weekend