Finding Data on Your Computer or in the File System

GNOME provides several ways to find data on your computer or in the file system. With Beagle (also called Desktop Search), you can easily search your personal information space (usually your home folder) to find documents, e-mails, Web history, IM/ITC conversations, source code, images, music files, applications, and much more.

To locate files on your computer, click Computer, enter your search terms in the Search field, then press Enter. The results are displayed in the Desktop Search dialog box.

You can use the results lists to open a file, forward it via e-mail, or display it in the file manager. Simply right-click an item in the results list and select the option you want. The options available for an item depend on the type of file it is. Clicking a file in the list displays a preview of the file and information such as the title, path, and date the file was last modified or accessed.

For more information, see Chapter 4, Searching with Beagle.

With Search for Files, you can locate files on your computer or in the file system using a variety of search criteria, such as file content, date, owner, or file size. Start it by clicking Computer+More Applications+System+Search for Files.

Searching for Files

Using Search for File on the System menu, you can locate files on your computer or on a network share using any number of search criteria.

Figure 1.9. Search for Files Dialog

Search for Files Dialog

Search for Files uses the find, grep, and locate UNIX commands, and all searches are case insensitive.

You can also open the Search for Files dialog by entering the following command in a terminal window:

gnome-search-tool

Performing a Basic Search

  1. Click Computer+More Applications+System+Search for Files.

  2. Type the search text in the Name contains field.

    The search text can be a filename or partial filename, with or without wildcards, as shown in the following table:

    Search Text

    Example

    Result

    Full or partial filename

    myfile.txt

    Searches for all files that contain “myfile.txt” in the filename.

    Partial filename combined with wildcards (* [ ])

    *.[ch]

    Searches for all files that have a .c or .h extension.

  3. In the Look in folder field, type the path to the directory where you want Search for Files to begin the search.

  4. Click Find.

Search for Files searches in the directory that you specify (and any subdirectories of the directory) and displays the results of the search in the Search Results list. If Search for Files does not find any files that match the search criteria, the application displays the message No files found in the Search results list.

Adding Search Options

Use Select more options to search by file content, dates, owner, or file size.

  1. Click Computer+More Applications+System+Search for Files.

  2. Type the search text in the Name contains field.

  3. In the Look in folder field, type the path to the directory where you want Search for Files to begin the search.

  4. Click Select more options, then click Available options

  5. Select a search option that you want to apply, then click Add.

    The following options are available:

    Option

    Description

    Contains the text

    Searches for a file by filename. Type a full filename or a partial filename with wildcards in the field provided. Use an asterisk (*) to indicate a sequence of characters. Use a question mark (?) to indicate a single character. The search is case sensitive.

    Date modified less than

    Searches for files that were modified within the period specified (in days).

    Date modified more than

    Searches for files that were modified before the period specified (in days).

    Size at least

    Searches for files that are equal to or larger than the size specified (in kilobytes).

    Size at most

    Searches for files that are smaller than or equal to the size specified (in kilobytes).

    File is empty

    Searches for empty files.

    Owned by user

    Searches for files that are owned by the user specified. Type the name of the user in the text box provided.

    Owned by group

    Searches for files that are owned by the group specified. Type the name of the group in the text box provided.

    Owner is unrecognized

    Searches for files that are owned by a user or group that is unknown to the system.

    Name does not contain

    Searches for filenames that do not contain the string that you enter. Enter a full filename or a partial filename with wildcards in the field provided. Use an asterisk (*) to indicate a sequence of characters. Use a question mark (?) to indicate a single character. The search is case sensitive.

    Name matches regular expression

    Searches for files that contain the specified regular expression in their directory path or filename. Type the regular expression in the text box provided.

    Regular expressions are special text strings used to describe a search pattern. For more information, see Regular-Expressions.info.

    Show hidden and backup files

    Includes hidden and backup files in the search.

    Follow symbolic links

    Follows symbolic links when searching for files.

    Include other filesystems

    Searches in directories that are not in the same file system as the start directory.

  6. Specify the required search information for the search option.

  7. To remove a search option from the current search, click the Remove button next to the option.

  8. Click Find.

Using the Search Results List

You can use the Search Results list to open or delete a file found during a search, or you can save the search results to a file.

Figure 1.10. Search Results List

Search Results List

To open a file displayed in the Search Results list, right-click the file, then click Open or double-click the file. To open the folder that contains a file displayed in the Search Results list, right-click the file, then click Open Folder.

To delete a file displayed in the Search Results list, right-click the file, then click Move to Trash.

To save the results of the last search that Search for Files performed, right-click anywhere in the Search results list, then click Save Results As. Type a name for the file that the results are saved to, then click Save.

Disabling Quick Searches

By default, Search for Files tries to speed up some searches by using the locate command. locate provides a secure way to index and quickly search for files. Because locate relies on a file index, the Search Results list might not be up to date. To disable quick searches, run the following command in a terminal window:

# gconftool-2 --type=bool --set /apps/gnome-search-tool/disable_quick_search 1