Solved

grep directory containing mysqlbinlog files for files

Posted on 2010-08-12
3
346 Views
Last Modified: 2013-12-06
I want to check all the files in a directory full of mysqlbinlog files for text of 'incident' and get -A10 lines after.

for example i can check 1 file at a time with:

mysqlbinlog /var/lib/mysql/mysqld-relay-bin.005794 | grep incident -A10
0
Comment
Question by:mcgilljd
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
Maciej S earned 500 total points
Comment Utility
mysqlbinlog /var/lib/mysql/mysqld-relay-bin.* | grep -A10 incident
0
 

Author Comment

by:mcgilljd
Comment Utility
and to put results in a file is it?

mysqlbinlog /var/lib/mysql/mysqld-relay-bin.* | grep -A10 incident > outfile.txt
0
 
LVL 23

Expert Comment

by:Maciej S
Comment Utility
Exactly.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now