Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

grep directory containing mysqlbinlog files for files

Posted on 2010-08-12
3
Medium Priority
?
375 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

636 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