Find keyword in a file

Hi,
I am looking for a command that can browse me thru a file for a particular keyword in UNIX.
ex: looking for keyword temp in "alert.log" file ..i.e i want to go all places one by one whereever the keyword temp comes in alertlog file on UNIX.
sample:
more alertlog.file
/temp
takes me only once to the keyword temp....how to continue till the end of file
Thanks

You'll have to add some modifiers to the grep command to file some previous lines so you get the time and other details about the error, for example:
[oracle@maquina2 bdump]$ grep ORA-00313 -B 2 alert_immr.log
Mon Jul 16 11:33:14 2007
Errors in file /u01/home/oracle/immr/admin/immr/udump/immr_ora_12212.trc:
ORA-00313: open failed for members of log group 1 of thread 1
Mon Jul 16 11:33:14 2007
Errors in file /u01/home/oracle/immr/admin/immr/udump/immr_ora_12212.trc:
ORA-00313: open failed for members of log group 2 of thread 1
Mon Jul 16 11:33:14 2007
Errors in file /u01/home/oracle/immr/admin/immr/udump/immr_ora_12212.trc:
ORA-00313: open failed for members of log group 3 of thread 1~ Madrid.

Similar Messages

  • Find keyword in XML file from an array of keywords

    Hi,
    I have an array of collection of keyword:
    $KeyWord = @("Fail","Exception","Terminated","Error")
    I want to check in a textfile sample.xml, if any or all keywords from the array $KeyWord exist. If any of the keyword exist in the textfile, a boolean variable $ExceptionOccurred will return $true.
    The code I am using working good with a TEXT file, but not working with XML file. Is there a way to convert XML to Text and then look for keyword in plaintext?
    Code:
    $KeyWord = @("Fail","Exception","Terminated","Error")
    $sampleFile = Get-Content .\file1.txt
    $ExceptionOccurred = $false
    $KeyWord | ForEach {
        If ($sampleFile -contains $_) {
            $ExceptionOccurred = $true
    $ExceptionOccurred

    hello,
    with PowerShell you can parsing XML files.
    Example XML-File:
    <ListOfData><Table><service>Backup1</service><description>Backup</description><status>Fail</status></Table><Table><service>Backup2</service><description>Backup</description><status>Exception</status></Table><Table><service>Backup2</service><description>Backup</description><status>Error</status></Table></ListOfData>
    with Select-Object you expand the XML as Table and ForEach-Object with if match the attribute "status" for value in the $KeyWord array.
    $KeyWord = @("Fail","Exception","Terminated","Error")[xml]$xml = Get-Content .\file.xml$xml.ListOfData | Select-Object -ExpandProperty Table | ForEach-Object{if($KeyWord -contains $_.status){$ExceptionOccurred = $true}}

  • ORA-29861 Error while editing or adding search keywords in a File Item

    Hi,
    We are getting the following error while editing or adding search keywords to a file item:
    ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE
    DAD name: portal30 PROCEDURE : PORTAL30.wwv_edit_tab.edititem
    Can you please tell us what went wrong.
    Thanks

    Vikas,
    From the server error messages reference:
    Cause: An attempt has been made to access a domain index that is being built or is marked failed by an unsuccessful ODCIIndexCreate or is marked unusable by a DDL operation.
    Action: Wait if the specified index is marked LOADING Drop the specified index if it is marked FAILED Drop or rebuild the specified index if it is marked UNUSABLE.
    It's possible you were loading the document while the index was being rebuilt. Search all_indexes where DOMIDX_STATUS <> 'VALID' OR DOMIDX_OPSTATUS <> 'VALID' to find the offending index and rebuild it.
    Regards,
    Jerry
    null

  • Find keyword doesn't work properly in Bridge CS4

    I recently upgraded my Bridge from CS3 to CS4 and I'm having trouble doing a find for keywords now. All my photos that I had saved with a keyword kept the keywords from CS3, but any time I do a find for a certain keyword, it says that it didn't find anything. However, when I go to a certain photo in Bridge and select or highlight that photo, then do a find for that photo using the keyword I saved for it, it will recognize the keyword and find the photo from then on. I have hundreds of photos and I don't have time to open every single folder and select every photo just so that Bridge will recognize its keyword. Is there any way around this and has anyone else had this problem?

    but any time I do a find for a certain keyword,
    Try the find menu (edit/find or cmd+F). In Source choose your main folder all your files are in. Criteria choose keyword and fill in one of the keywords you want.
    Be sure to have a checkmark in fornt of the options 'Include all subfolders' and 'include Non indexed files'.
    Hit find and let Bridge do it's searching. This first time may take a bit long but now Bridge starts indexing all files. After this you should be able to use the option for finding keywords as normal.

  • Can't find my iweb domain file when searching for it in iweb seo tool

    I am trying to get my iweb website recognized by Google. Can't seem to get the google html code to work in html snippet. So am now trying to use the iweb seo tool but can't find my iweb domain file when searching for it in iweb seo tool. My file is in user/library/applicationsupport/iweb/name.sites2
    It shows in the folder but is not active, so I can't choose it.

    The SEO ftp client is not what I'd recommend using. Once you add the metadata to a local copy of the files use a 3rd party ftp client like the free Cyberduck to upload the files. Much more reliable.
    Google does not use keywords for it's searches although other search engines do. Create a test page on your site (leave it out of the navbar) and try adding Google Analytics to it with Wyodor's instructions. If you get it to work then all you need to do is copy and paste the HTML snippet from the test page into your site pages.
    For information on visitors to your site you can also use StatCounter. It records the number of visitors and a lot more: where they are from, what browser used, which page visited and what site/page then came from for just a few. SC is easy to add to the pages as you get the code for your account, put it in an HTML snippet add the snippet to each page. Old Toad's Tutorial #13 - Adding a StatCounter as an HTML Snippet describes how to do it.
    Again use a test page or a separate test site to work out the details before adding to your site pages.

  • Add/Remove Keywords to multiple files?

    Hi Mac users!
    Is there a way to automatically add and/or remove keywords from mltiple files?
    First I would like to remove all the keywords from many of my files and then assign common keywords to selected files!
    One can do it manually, one by one, but that would take a huge amount of time!
    Is there any automatic way to do it? Perhaps with a specific application?
    Thanks for your help!

    Well I mis-spoke when I said they implemented what I asked for. They actually did something even better.
    There's a little text-entry area at the bottom of the keyword panel. You can type keywords in here and it finds them in the list (click the little magnifying glass icon to control how it searches--I have it set to "equals" so it will only do exact matches). When you hit enter, it automatically adds the matching keyword to the files. Or if there is no match, it creates a new keyword and adds it both to the keyword list and the selected files. Use ; to add multiple new keywords at once.
    Bart

  • Pb export/import keywords with psd file

    While working with export and import of metadata, I found the following strange behavior with LR1.3.1:
    0) Initial keywords
    1) In LR, I modified keywords of a psd file
    2) Export of metadata
    3) Remove all keywords of the picture in LR
    4) Then, reload of keywords.
    => I should get keywords defined at the step 1
    and I always get initial keywords (step 0). It appears than something is not working as I would expect when importing, just exported data.
    Any help to understand this behavior or workaround would be welcome.
    Thanks all,
    PH

    As Curt stated, the keywords are written to the file itself and will not be cleared using the clear and import function in Keywords.
    Using the clear and import option is useful if you want to get rid of the default keywords or have a better new list for import at hand. If you already have assigned some of these old keywords to files and they are not present in your current list then they will show as italic in the keyword panel (usually at the bottom under "Other keywords") once a file with this old keyword is selected in Bridge.
    When a keyword is in italic then you have the option to make it again persistent in your new list using right mouse click menu or leave it as it is. Using the find option in the menu should provide you with the result of all present keywords in the files you are searching in, regardless if they are in the list or not.

  • How do I find out how many files I have, as an earlier version of iTunes told you at the bottom of the screen. Can you please help me.

    How do I find out how many files I have, as an earlier version of iTunes told you at the bottom of the screen.
    Can anyone please help me with this so I know how many music files or video files I have in my collection.

    Have a look here...
    http://osxdaily.com/2012/11/29/5-tips-make-itunes-look-normal/

  • What is the difference between Topic Keywords and Index File Keywords?

    What is the difference between Topic Keywords and Index File Keywords? Any advantages to using one over the other? Do they appear differently in the generated index?
    RH9.0.2.271
    I'm using Webhelp

    Hi there
    When you create a RoboHelp project you end up with many different ancillary files that are used to store different bits of information. Many of these files bear the name you assigned to the project at the time you created it. The index file has the project name and it ends with a .HHK file extension. (HHK meaning HTML Help Keywords)
    Generally, unless you change RoboHelp's settings, you add keywords to this file and associate topics to the keywords via the Index pod. At the time you compile a CHM or generate other types of output, the file is consulted and the index is built.
    As I said earlier, the default is to add keywords to the Index file until you configure RoboHelp to add the keywords to the topics themselves. Once you change this, any keyword added will become a META tag in the topic code. If your keyword is BOFFO, the META tag would look like this:
    <meta name="MS-HKWD" content="BOFFO" />
    When the help is compiled or generated, the Index (.HHK) file is consulted as normal, but any topics containing keywords added in this manner are also added to the Index you end up with. From the appearance perspective, the end user woudn't know the difference or be able to tell. Heck, if all you ever did was interact with the Index pod, you, as an author wouldn't know either. Well, other than the fact that the icons appear differently.
    Operationally, keywords added to the topics themselves may hold an advantage in that if you were to import these topics into other projects, the Index keywords would already be present.
    Hopefully this helps... Rick

  • When looking at my "About This Mac" it says that I have 60gb of space left on my hard drive, but when I go into finder to find all of these files there is not 300gb worth in anything I search, even searching, "All files on the Mac". Help!?

    When looking at my "About This Mac" it says that I have 60gb of space left on my hard drive, but when I go into finder to find all of these files there is not 300gb worth in anything I search, even searching, "All files on the Mac". Help!?
    It says I have over 150 gigs of video on my hard drive. But I have gone through and deleted almost all of what shows up, still it says there is roughly the same amount on the hard drive. Where are these files? I want to delete them so I can have my hard drive clear.
    Thanks for your help guys!

    Quote from the article.
    Time Machine in OS X Lion includes a new feature called "local snapshots" that keeps copies of files you create, modify or delete on your internal disk. Local snapshots compliment regular Time Machine backups (that are stored on your external disk or Time Capsule) giving you a "safety net" for times when you might be away from your external backup disk or Time Capsule and accidentally delete a file.
    So what makes a notebook any different then a desktop, other then with a desktop you might have your tm backup drive connected all the time.
    The object here is to not indiscriminately delete files you need or want to keep. I personally have never deleted a file I wanted to keep.
    In essence a backup is for catastrophic failure of your system. So it can be restored once that failure has been fixed. Not because you go in willy nilly and start deleting files.

  • To find total number of files inside folder

    Hai,
       In knowledge management is there any option to find total number of files inside folder...
        I also want to see the recently uploaded and modified documents in a seperate iview...
        Iam using NW2004s SP8..
        Very urgent..
        Waiting for a positive reply..
        Thanks&regards,
         Kiruthika.S

    Hi Kiruthika,
    1. You only need the configarchive if you don't want create all the KM configuration objects mentioned in the guide manually. So, just create the objects mentioned there and you don't need the configarchive
    Also, the scenario works also on 2004s.
    2. Please check this thread on how to show the total number of files inside a folder:
    https://forums.sdn.sap.com/thread.jspa?threadID=19610
    3. It would be nice if you would consider rewarding the time people like Saravanan spend to investigate and answer your question by assigning points via the colored stars.
    Best regards,
    Robert

  • I have files that may have been created in various versions of Illustrator. We need to be able to open them, but all we have is CS6 suite. I have called and been told that "technicians at adobe" could perform a paid service to find out what the files were

    I have files that may have been created in various versions of Illustrator. We need to be able to open them, but all we have is CS6 suite. I have called and been told that "technicians at adobe" could perform a paid service to find out what the files were created in and get them to be useable in InDesign 6, but I'd need an email address that was registered to our software to give the help desk person. After finding the correct email address, different adobe help number people told me to come here to ask as there is no phone support. Can anyone get me to an adobe technician that can provide a price quote for finding out what created these files and for getting them converted? Thanks.

    Sorry, I understood you to say you had the whole CS6 suite, which includes Illustrator.
    As far as finding out what the files are, sometimes you can look at them in a text editor to figure this out. See below; the, Creator Tool line. Not every software package makes it this easy, though.

  • Hi,  I backed up my ipad and iphone on the same computer, will it be shown on the same folder or different? Mine is window 7, try to find the back up file follow the step that apple provided, it shown only iphone instead of ipad. Pls help.

    I backed up my ipad and iphone on the same computer, will it be shown on the same folder or different? Mine is window 7, try to find the back up file follow the step that apple provided, it shown only iphone instead of ipad. Pls help.

    What do you see under Edit > Preferences > Devices?
    tt2

  • Find and replace in files does not refresh when changes are made

    Using RH10, I search for a term with the Find and Replace Options pod. I use the Find Results list as a reference only, and open each file from the Topic List. I do this instead of opening the topics from the Find Results tab because I want to see the WYSIWYG changes. Anyway, I make my edits and delete the search term from each topic. Then, to make sure I have done all the work, I run the search again. I expect to see no or at least fewer matches than before, but I still get some or all of the same results as before, even though I double-check the Design and HTML views of the topics and even check the source of a topic separately in Notepad, all indicating that the search term is gone from the topic.
    There is some ridiculous lingering or echo going on. I make sure to select Look in: <Current Project>, and the paths of all the Find Results files are fine. How do you refresh the search so that this echo doesn't occur?
    Also, I close the Find and Replace Options pod, reopen it and start the search again, and the same results are there.
    Message was edited by: DMilkes

    Hi there
    To avoid the message about the file being modified, close all topics in the editor before commencing with any find and replace operations. The message is produced because you have the aforementioned topics open in the editor.
    As you mention "Find and replace in files", I'm guessing you are referring to version 8. I just opened version 8 and performed a find and replace to confirm. There is a button allowing you to clear all.
    On the clicking and dragging to create a link, it's never worked that way. You simply cannot drag from the Topic List pod to do it. But you can from the Project Manager pod. Perhaps you should consider submitting a Wish Form to ask for the ability to click and drag from the Topic List pod to create links.
    As far as rearranging your topics into different folders, as long as you do it from inside RoboHelp you shouldn't be destroying any links. RoboHelp will update references for you as you move things around. The only issue is if you are automatically creating your TOC structure based on the project structure. But usually that's a one time shot. From there forward you just manage things using the TOC editor.
    Hopefully this helps... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • My Macbook Pro can't find any of my files!

    Hi there,
    Since yesterday, my Mac suddenly can't find any of my files anymore. All the folders are there, but all the files are missing. There are 2 big question marks on the top of the finder window and when I click on them it says that files cannot be found. I have no clue what to do now. The only thing I did before this happened, was deleting my downloads folder, but nothing more. It's weird that all the folders are visible but the content not. Anyone experienced this too? What can one do in a case like this?
    Thank you for any help!
    Raphaela

    Did you run a disk check on it? You might have data corruption. The big question mark on the top of the finder window, I believe is a short cut, not the actual file. Did the actual file move? Did you rename the file? Did you change anything, like your username? Did KIDS use your machine? KIDS can do some silly stuff to your computer without even realizing it. I know this option may sound OFF BASE, but do you have a faulty trackpad, or use excessive hand lotion? (I have seen both of these cause undesired file moves, renames, etc...)
    I would run a disk check, and if available, use Disk Warrior, Drive Genius or similar to rebuild the directory.
    If that does not help, I would search for the file using Spotlight, or a 3rd party app like Find Any File.

Maybe you are looking for

  • Just Starting out with java packages

    Hello, I'm a beginner and I'm starting out with java packages. I wrote two simple .java files, one test program and one containing a simple class. Both files are compiling without errors but When I run the program I get an error NoClassDeffoundError.

  • How to create Variables in Reporting

    Hi All, I want to create Variables and processing types how to create in BI 7.0. could u Please provide me solutions step-by-step. Please ASAP. Thanks & Regards, Vijaay.

  • I am not able to connect to itunes store from itunes 10.5.2.11 on vista

    I get the message 'itunes store is not available because you aren't connected to the internet'. I can access other sites. i have itunes 10.5.2.11 on windows vista

  • VF06 - Background job

    Hello Experts, We are having a requirement to consolidate the deliveries with same PO into a single billing document. > For this, we have created a custom copy control routine and added customer PO to the ZUKRI field. This is working fine in VF01 or

  • Saving indifferent versions in BPS

    Hi, I'm trying to save all changes made on a particular record.We need weekly comparision of records. For eg: Transaction Number - 53 Plan Revenue - 10,000 Tomorrow if the value is changed to 15,000 When i'm trying to pull all data into bw based on l