Index |
Fereastra Căutare Interogări de bază - "după nume" Interogări avansate - "după atribute" Interogări și mai avansate - "după formulă" Fereastra rezultatului Șabloane Interogări |
Interogări
A query is a file search based on file attributes and can be performed within Tracker or in Terminal. Queries are saved in /boot/home/queries/ and by default last seven days before being purged. Note, these aren't static result lists of your search, but are the query formulas which trigger a new search whenever you open them.
Even better, you don't have to double-click to re-do a query. You can drill down a saved query just like any folder by right-clicking on it and navigating through the submenus.
Fereastra Căutare
You start a query by invoking the ALT F. You're presented with the Find window:
menu either from the Deskbar menu or any Tracker window or the Desktop (which is actually a fullscreen Tracker window). The shortcut isSelect recent or saved queries or save the current search parameters as Query Template.
Restrângeți căutarea de la
la tipuri de fișier specifice.- Define the search method:
- - a basic search by file or folder name
- - an advanced search, you specify search terms for one or more attributes
- - an even more advanced search, you can fine-tune a complex query term
Selectați dispozitivele în care căutați.
Introduceți termenul căutat.
Expander ascunde/afișează opțiunile adiționale.
Uncheck the
checkbox if you don't want this query self-destruct after 7 days.Verificați dacă interogarea ar trebui de asemenea să
.Opțional, introduceți un nume pentru această interogare dacă vreți să o salvați.
You can drag & drop the icon anywhere to save a query. Doing that with the right mouse button, offers the option to save as template.
Interogări de bază - "după nume"
If you simply want to find all files and folders on your mounted disks that match a certain pattern, simply leave the search method at ENTER.
, enter the search term into the text box and pressInterogări avansate - "după atribute"
You can create more advanced queries by searching within the attributes of specific file types. For that to work, these attributes have to be indexed.
You start by setting the filetype from
to, for example, and change the search method to .This adds a pop-up menu to the left of the textbox and the buttons
and under that. From the menu you choose which attribute to query. With and you can query additional attributes or remove them again. These attributes can be logically linked with AND/OR.Să luăm o interogare de email ca exemplu:
This is your Find window when you're looking for all emails Clara Oswald has sent to you in the last two months that had in the subject "sufflé" or "impossible".
As you see, searching through time-based attributes supports some useful phrases: besides for the "last 2 months", you could also use "today", "yesterday", "Monday" or "last Monday" (which would be the Monday last week), or "last 2 minutes/hours/days/weeks".
A good way to cut down the number of search results.
Interogări și mai avansate - "după formulă"
Typing in a formula query by hand is daunting and really quite unpractical. It still has its uses.
Take the above query by attribute of Clara's mails concerning vibraphones etc. If you have all the attributes and their search terms set, try switching to
mode and be overwhelmed by this one line query string:Încă o dată ca text, editat pentru lizibilitate:
(((((MAIL:from=="*[cC][lL][aA][rR][aA] [oO][sS][wW][aA][lL][dD]*") &&(MAIL:when>=%2 months%)) &&(MAIL:subject=="*[sS][uU][fF][fF][lL][éÉ]*")) ||(MAIL:subject=="*[iI][mM][pP][oO][sS][sS][iI][bB][lL][eE]*")) &&(BEOS:TYPE=="text/x-email"))
Care este utilizarea?
Puteți copia și lipi șirul într-un email, forum sau IRC pentru utilizarea sau depanarea acestuia de către alte persoane.
You can use this method to construct a query in query command in the Terminal.
mode and then switch to mode, to comfortably generate a search string. Enclosed in single quotes, that string can then be used with theYou can fine tune your query by inserting parenthesis where needed, make parts case-sensitive or negate logical combinations by changing. e.g. "==" to "!=" for a NOT AND. All you need is a basic understanding of regular expressions and maybe some scripting basics.
Fereastra rezultatului
After you start a search, the Find window will be replaced by a result window. Here is an example that queried for "server":
Besides the gray background, result windows work exactly like any other Tracker window. Some things are worth noting:
Puteți deschide locația unui fișier sau dosar prin dublu clic pe atributul de cale al acestuia.
With ALT G you get back to your Find window to refine your query.
orA query is live, i.e. if a file that matches your search criteria appears or disappears from your system, this change is reflected in your results in real-time.
You can assign a sensible attribute layout for query results of a specific filetype. Open a folder containing files of the filetype you'd like to create a template for and arrange the attributes how you'd like to have query results presented. Copy this layout with
.Open /boot/home/config/settings/Tracker/DefaultQueryTemplates, create a new folder named group/filetype, replacing the slash with an underscore, e.g. "audio_x-mp3". Open the new folder and paste in the previously copied layout with .
Șabloane Interogări
If you double click a saved query, the file search is at once started and the result window opens immediately. However, you may not want to search with these exact search parameters, but use it as starting point to only slightly tweak the formula.
By using the menu item (see (1) in screenshot at the top) or drag & dropping the icon (10) anywhere with the right mouse button, you can create just such a template. Double clicking it won't open a result window, but the Find panel, giving you the opportunity to quickly change search strings or add/remove attributes.
Oriunde alegeți să salvați șabloanele de interogări, acestea vor fi listate în meniul panoului Căutare al interogărilor recente.