[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Unix: how do I find string within a long log file?

Posted on 2009-02-13
2
Medium Priority
?
556 Views
Last Modified: 2013-12-26
AIX unix, under my dir

$ find . -name '*myLogFile*' -print
displays list of logs files, then

$ pg logfilename

this file is huge, how do I search for string within this log file? what commands should I use?
0
Comment
Question by:epifanio67
  • 2
2 Comments
 
LVL 5

Expert Comment

by:tercex11
ID: 23635270
grep string /filename
0
 
LVL 5

Accepted Solution

by:
tercex11 earned 2000 total points
ID: 23635286
if it is more that one word use egrep

i.e. egrep "for x in" filename
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Utilizing an array to gracefully append to a list of EmailAddresses
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month19 days, 21 hours left to enroll

873 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