Solved

grep directory containing mysqlbinlog files for files

Posted on 2010-08-12
3
366 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

718 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