You use theFind command in the Be Menu to create queries --investigations that let you find files and folders based on their names, sizes, modification dates, and so on. The Find panel looks like this:
The Find panel comes with a number of pre-formatted query templates, which you'll see when you click the arrow button in the top-left corner. (The number and nature of the templates may be different than shown in the illustration).
Picking a template--such as E-mail from --automatically sets up the panel to look for e-mail messages based on the names of their senders, as shown below:
To refine your search, click Add to add more criteria, such as When to set a range of dates to search, and Subject to specify a subject to look for.
Toggle the arrow near the bottom left corner of the panel for more options.
Query name: lets you name the query that you're creating. All queries are saved so you can re-run them; naming a query makes it easier to identify later.
Include trash tells the Find mechanism to rummage through the Trash can; by default, files that are in the trash are ignored.
Checking the Temporary check box means your query will be forgotten after a few days. If you want query to be saved forever, uncheck Temporary.
When you're ready to run your query, click Search.
The results of your query are shown in a query result. The window below shows the result of searching for all files that are bigger than 1 MB ("big files"). Before running the query, we named it "Big Files." The query's name is used as the query result window's title. window.
Except for the background color and the fact the it only works in List View, the query result window is like any Tracker window: You can open the files and folders, move them, copy them--just about anything you would do in a "normal" Tracker window.
After you run a query, it's automatically added to the Find panel's query list. Pop open the top left menu and you'll see your queries listed just below the query templates. The illustration below shows our "Big Files" query. Selecting the Big Files item from the query list fills in the Find panel so we can easily run the query again.
Although using a query template is the easiest way to learn how to use queries, you can also build them from scratch. You build the query by using the menus at the top of the Find panel.
You then fill in the rest of the panel by supplying values for the name, attributes, or formula.
To create your own query template, fill in the Find panel with as much information as want to have in your template, and then choose Save Query as template... from the query list pop up (shown in the previous illustration). A file panel pops open that lets you save the template as a file. Although you can put the template anywhere you want, the expected location is /boot/home/queries. Next time you open the Find panel, you'll see your query template listed among the default templates.
You can also save your query template by Control dragging the file drawer icon out of the Find panel and dropping it in a folder or onto the desktop; when you release the mouse you'll get a context menu that lets you either Create a Query or Create a Query template.
To edit a query template, select Edit Query (Alt+g) from the template file's context menu. This brings up anEdit Query Template window, which looks a lot like a normal Find panel, except you Save rather than Search when you're done.
The difference between a query and a query template is a bit subtle, but it can be useful. All queries and query templates are stored as files; as mentioned above, the default location for these files is /boot/home/queries. You can run a query or query template simply by double-clicking the file that represents it:
Note that choosing a query from the Find panel's query list doesn't automatically run the query, but simply fills in the panel just like a query template does.