How do i find out which script is inserting into mysql db without viewing a million files?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A very general approach, if you’re on Unix or Mac, is to type:
where
script patternis something like*.shthat matches your script andsearch patternis something that will match the insertion command you’re looking for.findis a *nix program that finds all files in a directory and its subdirectories, the.is where to search from (replace it with/if you want to search your entire machine, but be prepared to wait awhile, and you might want to redirect error output to/dev/null).-execis an option infindthat runs a program on the files it finds,grepis a search engine,-Hntells it to report the file name and line number where it finds the pattern requested, and{} \;is just syntactic sugar required by the-execoption.