Solved

grep directory containing mysqlbinlog files for files

Posted on 2010-08-12
3
357 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
ID: 33422901
mysqlbinlog /var/lib/mysql/mysqld-relay-bin.* | grep -A10 incident
0
 

Author Comment

by:mcgilljd
ID: 33423130
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
ID: 33423506
Exactly.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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.

827 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