2010-07-08 22:03:41 +04:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" xml:lang = "en-US" >
< head >
<!--
*
* Copyright 2008-2009, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Humdinger < humdingerb @ gmail . com >
2010-08-02 20:51:09 +04:00
* Translators:
* Pengphei Han
2011-05-22 22:01:43 +04:00
* dgy18787
2010-07-08 22:03:41 +04:00
*
-->
< meta http-equiv = "content-type" content = "text/html; charset=utf-8" / >
< meta http-equiv = "Content-Style-Type" content = "text/css" / >
< meta name = "robots" content = "all" / >
2010-08-02 20:51:09 +04:00
< title > 查询< / title >
2010-07-08 22:03:41 +04:00
< link rel = "stylesheet" type = "text/css" href = "../Haiku-doc.css" / >
< / head >
< body >
< div id = "banner" >
2010-10-28 12:57:17 +04:00
< div > < span > 用户指南< / span > < / div >
2010-07-08 22:03:41 +04:00
< / div >
< div class = "nav" >
< div class = "inner" >
< ul class = "lang-menu" >
< li class = "now" > < img src = "../images/flags/zh_CN.png" alt = "" / > 中文 [中文]< / li >
2017-06-24 01:19:23 +03:00
< li > < a href = "../ca/queries.html" > < img src = "../images/flags/ca.png" alt = "" / > Català< / a > < / li >
2010-07-08 22:03:41 +04:00
< li > < a href = "../de/queries.html" > < img src = "../images/flags/de.png" alt = "" / > Deutsch< / a > < / li >
2017-06-24 01:19:23 +03:00
< li > < a href = "../en/queries.html" > < img src = "../images/flags/gb.png" alt = "" / > English< / a > < / li >
2010-07-08 22:03:41 +04:00
< li > < a href = "../es/queries.html" > < img src = "../images/flags/es.png" alt = "" / > Español< / a > < / li >
2017-06-24 01:19:23 +03:00
< li > < a href = "../fr/queries.html" > < img src = "../images/flags/fr.png" alt = "" / > Français< / a > < / li >
< li > < a href = "../it/queries.html" > < img src = "../images/flags/it.png" alt = "" / > Italiano< / a > < / li >
2012-11-16 01:36:54 +04:00
< li > < a href = "../hu/queries.html" > < img src = "../images/flags/hu.png" alt = "" / > Magyar< / a > < / li >
2014-05-31 02:02:36 +04:00
< li > < a href = "../pl/queries.html" > < img src = "../images/flags/pl.png" alt = "" / > Polski< / a > < / li >
2017-06-24 01:19:23 +03:00
< li > < a href = "../pt_PT/queries.html" > < img src = "../images/flags/pt_PT.png" alt = "" / > Português< / a > < / li >
< li > < a href = "../pt_BR/queries.html" > < img src = "../images/flags/pt_BR.png" alt = "" / > Português (Brazil)< / a > < / li >
2016-05-06 05:15:13 +03:00
< li > < a href = "../ro/queries.html" > < img src = "../images/flags/ro.png" alt = "" / > Română< / a > < / li >
2017-06-24 01:19:23 +03:00
< li > < a href = "../sk/queries.html" > < img src = "../images/flags/sk.png" alt = "" / > Slovenčina< / a > < / li >
< li > < a href = "../fi/queries.html" > < img src = "../images/flags/fi.png" alt = "" / > Suomi< / a > < / li >
< li > < a href = "../sv_SE/queries.html" > < img src = "../images/flags/sv_SE.png" alt = "" / > Svenska< / a > < / li >
< li > < a href = "../ru/queries.html" > < img src = "../images/flags/ru.png" alt = "" / > Русский< / a > < / li >
< li > < a href = "../uk/queries.html" > < img src = "../images/flags/uk.png" alt = "" / > Українська< / a > < / li >
< li > < a href = "../jp/queries.html" > < img src = "../images/flags/jp.png" alt = "" / > 日本語< / a > < / li >
2010-07-08 22:03:41 +04:00
< / ul >
< span >
« < a href = "index.html" > 索引< / a >
2010-10-28 12:57:17 +04:00
:: < a href = "contents.html" class = "uplink" > 内容< / a >
:: < a href = "workshop-filetypes+attributes.html" > 操作讲解< / a > »
2010-07-08 22:03:41 +04:00
< / span > < / div >
< / div >
< div id = "content" >
< div >
< table class = "index" id = "index" summary = "index" >
< tr class = "heading" > < td > 索引< / td > < / tr >
< tr class = "index" > < td >
2010-08-02 20:51:09 +04:00
< a href = "#find-window" > 查询窗口< / a > < br / >
2011-05-22 22:01:43 +04:00
< a href = "#basic-query" > 基本查询 - "使用名称"< / a > < br / >
2010-08-11 21:56:45 +04:00
< a href = "#adv-query" > 标准查询 - "使用属性"< / a > < br / >
< a href = "#more-adv-query" > 高级查询 - "使用表达式"< / a > < br / >
2010-08-02 20:51:09 +04:00
< a href = "#result-window" > 结果窗口< / a > < br / >
< a href = "#query-template" > 查询模板< / a >
2010-07-08 22:03:41 +04:00
< / td > < / tr >
< / table >
2010-08-02 20:51:09 +04:00
< h1 > 查询< / h1 >
2010-07-08 22:03:41 +04:00
2011-05-22 22:01:43 +04:00
< p > 查询是基于文件属性的文件搜索,可以在文件浏览器或者终端中进行。所有的查询保存在 < span class = "path" > /boot/home/queries/< / span > ,并且保持七天才予以清除。需要注意的是,这些并不是您静态的搜索结果列表,而是查询的规则,当您打开它们时,将会再次进行搜索。
2010-09-17 17:28:39 +04:00
< br / >
比较方便的是,您不需要双击来再次执行查询,而是可以< a href = "tracker.html#navigating" > 深入< / a > 一个保存的查询,就如右键点击任何的文件夹,然后导航至相应的子菜单。< / p >
2010-07-08 22:03:41 +04:00
< h2 >
< a href = "#" > < img src = "../images/up.png" style = "border:none;float:right" alt = "index" / > < / a >
2010-08-02 20:51:09 +04:00
< a id = "find-window" name = "find-window" > 查询窗口< / a > < / h2 >
2011-05-22 22:01:43 +04:00
< p > 您可以从 < span class = "menu" > 查找...< / span > 菜单,桌面栏菜单,任何文件浏览器窗口,或者桌面(一个全屏的文件浏览器窗口)调用查询。对应的快捷键是 < span class = "key" > ALT< / span > < span class = "key" > F< / span > 。它将会呈现如下查找窗口:< / p >
2010-07-08 22:03:41 +04:00
< img src = "images/queries-images/basic-query.png" alt = "basic-query.png" / >
< ol >
2010-09-17 17:28:39 +04:00
< li > < p > 选择最近或者保存的查询,或者保存当前的搜索参数为 < a href = "#query-template" > 查询模板< / a > 。< / p > < / li >
2011-05-22 22:01:43 +04:00
< li > < p > 查询范围从 < span class = "menu" > 所有文件和目录< / span > 缩小到特定的文件类型。< / p > < / li >
2010-09-17 17:28:39 +04:00
< li > 定义搜索方法:< ul >
2011-05-22 22:01:43 +04:00
< li > < span class = "menu" > 使用名称< / span > - 基本搜索,基于文件或者文件夹名的查询< / li >
< li > < span class = "menu" > 使用属性< / span > - 标准搜索,基于一个或多个属性的查询< / li >
< li > < span class = "menu" > 使用表达式< / span > - 高级搜索,基于查询规则的复杂查询< / li > < / ul > < / li >
2010-09-17 17:28:39 +04:00
< li > < p > 选择所要搜索的目标驱动。< / p > < / li >
< li > < p > 输入搜索词。< / p > < / li >
< li > < p > 扩展项是否隐藏附加选项。< / p > < / li >
< li > < p > 如果您不希望查询保存7天, 您可以不勾选 < span class = "menu" > Temporary< / span > 复选框。< / p > < / li >
2011-05-22 22:01:43 +04:00
< li > < p > 如果您打算查询垃圾箱,您可以选中 < span class = "menu" > 包括垃圾箱< / span > 。< / p > < / li >
2010-09-17 17:28:39 +04:00
< li > < p > 可选的,如果您希望保存查询,您可以输入名字为其命名。< / p > < / li >
< li > < p > 您可以拖拽图标到任何位置保存查询。右键点击查询文件,提供了选项将其保存为模板。< / p > < / li >
2010-07-08 22:03:41 +04:00
< / ol >
< h2 >
< a href = "#" > < img src = "../images/up.png" style = "border:none;float:right" alt = "index" / > < / a >
2011-05-22 22:01:43 +04:00
< a id = "basic-query" name = "basic-query" > 基本查询 - "使用名称"< / a > < / h2 >
< p > 如果您仅希望在挂载的磁盘中所有的文件和目录中查找出匹配特定模式的内容,只要将搜索方法设置为 < span class = "menu" > 使用名称< / span > ,然后在文本框中输入搜索内容,并按下 < span class = "key" > ENTER< / span > 即可。< / p >
2010-07-08 22:03:41 +04:00
< h2 >
< a href = "#" > < img src = "../images/up.png" style = "border:none;float:right" alt = "index" / > < / a >
2010-08-11 21:56:45 +04:00
< a id = "adv-query" name = "adv-query" > 标准查询 - "使用属性"< / a > < / h2 >
2011-05-22 22:01:43 +04:00
< p > 您可以通过对特定文件类型属性的搜索来创建更加高级的查询。为了执行该操作,这些属性必须首先进行< a href = "index.html" > 索引< / a > 。< / p >
2010-07-08 22:03:41 +04:00
< img src = "images/queries-images/query-window.png" alt = "query-window.png" / >
2011-05-22 22:01:43 +04:00
< p > 首先,您需要从 < span class = "menu" > 所有文件和文件夹< / span > 设置文件类型,例如, 设置为< span class = "menu" > Text | E-mail< / span > ,并且修改搜索方式为 < span class = "menu" > 使用属性< / span > 。< / p >
< p > 这样将添加一个弹出菜单到文本框的左侧,还可以在其下侧 < span class = "button" > 添加< / span > 和 < span class = "button" > 删除< / span > 按钮。 通过该菜单,您可以选择查询的属性。而使用 < span class = "button" > 添加< / span > 和 < span class = "button" > 删除< / span > 按钮,您可以添加或者删除其他查询属性。这些属性可以通过 AND/OR 进行逻辑链接。< / p >
< p > 我们以一次邮件查询为例:< / p >
2010-07-08 22:03:41 +04:00
< img src = "images/queries-images/query-window-filled.png" alt = "query-window-filled.png" / >
2011-05-22 22:01:43 +04:00
< p > 这是查询近两个月内 Clare Botters以 "vibraphone" 或 "skepticality" 为主题的邮件的查找窗口。< br / >
如您所见,基于时间属性的搜索可以支持一些有用的词汇:除了 "last 2 months",您还可以使用 "today", "yesterday", "Monday" 或者 "last Monday" (相当于 Monday last week) , 或者 "last 2 minutes/hours/days/weeks"。< br / >
这是减小搜索结果数量的很好方式。< / p >
2010-07-08 22:03:41 +04:00
< h2 >
< a href = "#" > < img src = "../images/up.png" style = "border:none;float:right" alt = "index" / > < / a >
2010-08-11 21:56:45 +04:00
< a id = "more-adv-query" name = "more-adv-query" > 高级查询 - "使用表达式"< / a > < / h2 >
2011-05-22 22:01:43 +04:00
< p > 手动输入表达式确实让人生畏,并且不切实际。但它仍有自己的用处。< / p >
< p > 使用属性查询 Calara 的邮件中有关 vibraphones 等内容。如果您设置了所有的属性和它们的搜索项,可以尝试切换为< span class = "menu" > 使用表达式< / span > 模式,然后淹没于这一行的查询字符串:< / p >
2010-07-08 22:03:41 +04:00
< img src = "images/queries-images/formula-query.png" alt = "formula-query.png" / >
2011-05-22 22:01:43 +04:00
< p > 一行一段文本的编辑方便于阅读:< / p >
2010-07-08 22:03:41 +04:00
< pre > (((((MAIL:from=="*[cC][lL][aA][rR][aA] [bB][oO][tT][tT][eE][rR][sS]*")
& & (MAIL:when> =%2 months%))
& & (MAIL:subject=="*[vV][iI][bB][rR][aA][pP][hH][oO][nN][eE]*"))
||(MAIL:subject=="*[sS][kK][eE][pP][tT][iI][cC][aA][lL][iI][tT][yY]*"))
& & (BEOS:TYPE=="text/x-email"))< / pre >
2011-05-22 22:01:43 +04:00
< p > 如何使用?< / p >
2010-07-08 22:03:41 +04:00
< ul >
2011-05-22 22:01:43 +04:00
< li > < p > 您可以复制粘贴字符串到邮件, 论坛及IRC中供他人使用或调试。< / p > < / li >
< li > < p > 您可以使用这种方法在< span class = "menu" > 属性< / span > 模式中创建查询,然后切换到< span class = "menu" > 表达式< / span > 模式,从而顺利的创建用于终端查询或脚本中的搜索字符串。< / p > < / li >
< li > < p > 您可以微调查询,在需要的地方插入括号,使某些部分大小写敏感,或者取消逻辑组合,如为 NOT AND 修改 "< tt > < / tt > " 为 "< tt > !=< / tt > "。所有您需要的就是基本理解< a href = "http://en.wikipedia.org/wiki/Regular_expression" class = "external free" title = "Wikipedia: Regular expression" > 正则表达式< / a > ,和脚本的基础知识。< / p > < / li >
2010-07-08 22:03:41 +04:00
< / ul >
< h2 >
< a href = "#" > < img src = "../images/up.png" style = "border:none;float:right" alt = "index" / > < / a >
2010-08-02 20:51:09 +04:00
< a id = "result-window" name = "result-window" > 结果窗口< / a > < / h2 >
2011-05-22 22:01:43 +04:00
< p > 在启动搜索之后,查找窗口将会被结果窗口取代,下面是 "server" 的查询结果示例:< / p >
2010-07-08 22:03:41 +04:00
< img src = "images/queries-images/result-window.png" alt = "result-window.png" / >
2011-05-22 22:01:43 +04:00
< p > 除了灰色的背景,结果窗口和其他的文件浏览器窗口相似。有待提醒内容如下:< / p >
2010-07-08 22:03:41 +04:00
< ul >
2011-05-22 22:01:43 +04:00
< li > < p > 您可以双击文件路径属性打开其所在位置。< / p > < / li >
< li > < p > 使用 < span class = "menu" > 文件 | 编辑查询< / span > 或 < span class = "key" > ALT< / span > < span class = "key" > G< / span > 快捷键,您可以返回查找窗口以调整查询。< / p > < / li >
< li > < p > 查询是实时的,即如果匹配搜索条件的文件在系统中出现或消失,将会实时的反馈到您的结果。< / p > < / li >
2010-07-08 22:03:41 +04:00
< / ul >
2011-05-22 22:01:43 +04:00
< p > 您可以定义敏感的属性用于特别文件类型的查询结果。打开包含该类型文件的文件夹,您可能会根据自己希望的结果显示来创建查询模板,并对属性排序。使用< span class = "menu" > 属性 | 复制布局< / span > 来复制该布局。< / p >
< p > 打开 < span class = "path" > /boot/home/config/settings/Tracker/DefaultQueryTemplates< / span > ,创建 < i > group/filetype< / i > 文件夹,并替换斜线为下划线,如 "audio_x-mp3" 。打开新建文件夹,然后通过 < span class = "menu" > 属性 | 粘贴布局< / span > 将先前的布局粘贴到这里。< / p >
2010-07-08 22:03:41 +04:00
< h2 >
< a href = "#" > < img src = "../images/up.png" style = "border:none;float:right" alt = "index" / > < / a >
2010-08-02 20:51:09 +04:00
< a id = "query-template" name = "query-template" > 查询模板< / a > < / h2 >
2011-05-22 22:01:43 +04:00
< p > 如果你你双击已保存的查询,将立即启动文件搜索,而且结果窗口也会马上打开。然而,您可能不希望使用这些 < i > 确定< / i > 参数进行搜索,而是使用它作为调节表达式的切入点。< br / >
通过使用 < span class = "menu" > 保存查询为模板< / span > 菜单项(查阅顶部的 < a href = "#find-window" > (1) 屏幕截图< / a > )或者使用右键拖动图标 (10) ,您可以创建这样一个模板。双击它不会打开结果窗口,而是查找面板,这样您就可以快速的修改搜索字符串或 添加/删除 属性。< / p >
< p > 无论在哪儿保存查询模板,它们都将列在查找面板中的最近查询中,< / p >
2010-07-08 22:03:41 +04:00
< / div >
< / div >
< div class = "nav" >
< div class = "inner" > < span >
« < a href = "index.html" > 索引< / a >
2010-10-28 12:57:17 +04:00
:: < a href = "contents.html" class = "uplink" > 内容< / a >
:: < a href = "workshop-filetypes+attributes.html" > 操作讲解< / a > »
2010-07-08 22:03:41 +04:00
< / span > < / div >
< / div >
< / body >
< / html >