Write Cron Job as below

0 * * * * awk '/"s":"W"/ || /"s":"E"/ || /"s":"F"/' /var/log/mongodb/mongod.log >> /var/log/mongodb/error.log && > /var/log/mongodb/mongod.log

Change example by your path

,

DMCA.com Protection Status


Leave a Reply

Your email address will not be published. Required fields are marked *