Solaris Common Desktop Environment: User's Guide

Using File Finder

File Finder is an application that searches a folder and its subfolders and returns a list of files or folders that match your search criteria. Files and folders are sometimes generally called objects.

When specifying search criteria, you typically supply a file or folder name, or some text that you expect to find in the required file. You can also specify the size, owner, date modified, type, and permissions.

To Open File Finder

You can open File Finder from the Front Panel or from inside File Manager.

    Click the Find File control on the Files subpanel of the Front Panel.

    The Find File application opens with the default search path set to your home folder.

    Or, choose Find on the File menu of the File Manager application.

    The Find File application opens with the default search path set to the folder that was displayed in File Manager.

Graphic

To Find a File or Folder by Name

  1. Open File Finder.

    File Finder displays the Find dialog box.

  2. Select the folder under which you expect to find the required files or folders using the following table as a guide to the menu items in the Find dialog.

    Graphic

     Menu Item Where File Finder Searches
     My Home DirectoryYour home directory (referred to as $HOME in this chapter), for example, /home/fredj
     Floppy Contents of the diskette drive
     CD-ROM Contents of the CD-ROM drive
     Local Storage All folders on this workstation
     $PATH All folders on the workstation's default path
     Other Host Specify the hostname of a different workstation
     Other Folder Specify another folder on this workstation

    Folders are arranged in a hierarchical structure (Basic File System Concepts) By default, the Find operation will search the folder you specify and all its subfolders.

  3. If you want to search across symbolic links that originate on your search path, select the Follow Links check box.


    Tip –

    If the actual location of a linked folder is at the top level of a large number of folders, the search might take a long time. Be aware of the locations to which folders are linked before starting search operations.


  4. Select whether you will be searching for a file name containing, equalling, or not containing your search text by selecting the appropriate option in the Whose Name selector.

  5. Type a full or partial name of the file or folder you want to find into text box on the same line as the Whose Name selector.


    Note –

    The following applies when you select “is equal to” from the and Name selector:

    When you specify a file or folder name, you can include wildcard characters such as asterisk (*) and question mark (?). The * matches any string of characters (including no characters), and ? matches any single character. For example:

    ba*-matches all names that begin with the string ba

    ba?-matches all three-character names that begin with the string ba

    *.dt-matches all names that end with the .dt suffix

    *.???-matches all names that have a three-character suffix

    The file name and contents can be specified using the same regular expression syntax allowed by the find command. (Refer to the find man page and grep man page for more information.)


  6. Click Find.

    File Manager begins searching the specified folder and its subfolders for files that match the specified search criteria. Matches that are found are listed in the Items Found list. You can stop the search at any time by clicking the Stop button.


    Tip –

    If too many objects are returned, you can specify more restrictive criteria and try again.


  7. (Optional) If you want to go to an object in the list, select it and click Go To open File Manager displaying its folder, or click Put on Workspace to display an icon for it on the workspace.

To Find a File by Contents

  1. Open File Finder.

  2. Click More Criteria to display the More Criteria dialog box.

  3. Select the Content checkbox and click OK.

    The And Content line is added to the Find dialog.

  4. Specify the search folder and any name constraints for the search on the Find Items In line and on the Whose Name line.

  5. If you leave the File or Folder Name field empty, File Manager searches every file within the search folder.

    Names can be specified using the same regular expression syntax allowed by the grep command. (Refer to the grep man page for more information.)

  6. In the File Contents field, type the text string you want to find.

    If you select “and content contains (any case), then case is ignored for this string (upper- and lowercase letters are equivalent). You do not have to use complete words. For example, if you type fi it will find both fish and File.

  7. Click Find to commence the search.

    File Manager begins searching the search folder and its subfolders for any file containing the search string. Matches that are found are listed in the Files Found list. Once you have found a file, you can select it in the list and then click Go To to open File Manager for its folder. You can stop the search at any time by clicking Stop.


    Tip –

    If too many files are returned, specify more restrictive criteria.


Finding a File by File Properties

The previous procedures explained how to search for a file or folder by specifying a name, and how to search for a file by specifying some of its contents. You can also specify the following object properties as search criteria:

By default, File Finder displays only the line for specifying name criteria. By clicking More Criteria, you can display lines for other criteria.

Figure 5–3 File Finder With All Search Criteria Displayed

Graphic

To Find a File by File Properties
  1. Open File Finder.

    File Finder opens with the default display and settings.

  2. Click More Criteria to display the More Criteria dialog box.

  3. Select the check boxes for the criteria that you intend specifying in your search.

    File Finder updates the Find dialog box to contain a line for specifying each of the selected criteria.

  4. (Optional) Specify the folder to be searched, the name of the file or folder, and the contents of the required file using the instructions in To Find a File or Folder by Name and To Find a File by Contents.

  5. Specify criteria relating to the properties of the file or folder on the lines provided.

    Each line of constraints will be evaluated as described above. If you use more than one set of criteria, File Finder will return only objects that satisfy all of the search criteria.

  6. When you are satisfied with the criteria you have entered, click Find.

    File Finder searches the specified folders and subfolders, and returns a list of the files and folders that match all of the specified search criteria. You can stop the search at any time by clicking Stop.


    Tip –

    If too many files are returned, you can specify more restrictive criteria and try again.