Results 1 to 3 of 3

Thread: Search by content of a file

  1. #1
    Join Date
    Aug 2007
    Beans
    35

    Search by content of a file

    According to the ubuntu pocket guide for 10.4 you should be able to search by content of a file per the pasted info below

    Desktop search
    Ubuntu offers a powerful desktop search tool in the form of Tracker.
    Unlike standard file searching tools, Tracker is able to catalog the
    contents of files such as PDFs or office documents, as well as their
    filenames. This means you are able to search not only by filename, but
    by key phrases that the document might contain.
    To activate Tracker, click System  Preferences  Search and Indexing.
    Put a check in the Enable Indexing and Enable Watching boxes. If
    you’re using a notebook computer, you might also check Disable All
    Indexing When on Battery. Click OK once done, and click the RESTART
    button when prompted.

    I can not find "search and indexing" in any list.

  2. #2
    Join Date
    Oct 2008
    Location
    Tulsa,Ok
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Search by content of a file

    From a Terminal you can search the contents of files in a folder with the following command.


    Code:
    grep -i -R -l word folder/*

    This would look for 'word' in all files in the 'folder' directory.

    UPDATE: Here is some info on Tracker:

    To install Tracker
    Code:
    sudo apt-get install tracker-search-tool
    From the Tracker Preferences application, you can configure what you want to index

    References
    https://help.ubuntu.com/community/MetaTracker
    http://projects.gnome.org/tracker/documentation.html
    Last edited by duanedesign; July 2nd, 2010 at 03:50 AM.

  3. #3
    Join Date
    Aug 2007
    Beans
    35

    Re: Search by content of a file

    I am new to linux and I must be doing something wrong. I created a word doc with my name Diviney in the content. I saved it to the desktop. I typed a comand "grep -i -R -l Diviney Desktop/* and it did somthing and came back to prompt.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •