haiku/docs/userguide/zh_CN/index.html

167 lines
5.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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>
* Translators:
* Pengphei Han
*
-->
<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" />
<title>索引</title>
<link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
</head>
<body>
<div id="banner">
<div><span>用户指南</span></div>
</div>
<div class="nav">
<div class="inner">
<ul class="lang-menu">
<li class="now"><img src="../images/flags/zh_CN.png" alt="" />  中文 [中文]</li>
<li><a href="../fr/index.html"><img src="../images/flags/fr.png" alt="" />Français</a></li>
<li><a href="../de/index.html"><img src="../images/flags/de.png" alt="" />Deutsch</a></li>
<li><a href="../it/index.html"><img src="../images/flags/it.png" alt="" />Italiano</a></li>
<li><a href="../ru/index.html"><img src="../images/flags/ru.png" alt="" />Русский</a></li>
<li><a href="../es/index.html"><img src="../images/flags/es.png" alt="" />Español</a></li>
<li><a href="../sv_SE/index.html"><img src="../images/flags/sv_SE.png" alt="" />Svenska</a></li>
<li><a href="../jp/index.html"><img src="../images/flags/jp.png" alt="" />日本語</a></li>
<li><a href="../uk/index.html"><img src="../images/flags/uk.png" alt="" />Українська</a></li>
<li><a href="../pt_PT/index.html"><img src="../images/flags/pt_PT.png" alt="" />Português</a></li>
<li><a href="../fi/index.html"><img src="../images/flags/fi.png" alt="" />Suomi</a></li>
<li><a href="../sk/index.html"><img src="../images/flags/sk.png" alt="" />Slovenčina</a></li>
<li><a href="../en/index.html"><img src="../images/flags/gb.png" alt="" />English</a></li>
</ul>
<span>
« <a href="attributes.html">Attributes属性</a>
:: <a href="contents.html" class="uplink">内容</a>
:: <a href="queries.html">查询</a> »
</span></div>
</div>
<div id="content">
<div>
<h1>索引</h1>
<p><a href="attributes.html">属性</a><a href="queries.html">查询</a>是Haiku的主要特性。由于属性只能独立的用于显示文件的附加信息而对于查询则需要建立索引。索引把属性放置在一个查询表中而这也将会使查询更加轻量化和快速。<br />
索引是文件系统的一部分,而且它独立于特定的磁卷和分区。</p>
<h2>终端中的索引命令</h2>
<p>有几个命令可以用于管理索引:</p>
<ul>
<li><b>lsindex</b> - 显示当前磁卷或者分区中的索引属性。<br />
下面是默认索引的属性:</li>
</ul>
<pre class="terminal"> ~ -&gt;lsindex
BEOS:APP_SIG
MAIL:account
MAIL:cc
MAIL:chain
MAIL:draft
MAIL:flags
MAIL:from
MAIL:name
MAIL:pending_chain
MAIL:priority
MAIL:reply
MAIL:status
MAIL:subject
MAIL:thread
MAIL:to
MAIL:when
META:address
META:city
META:company
META:country
META:email
META:fax
META:group
META:hphone
META:name
META:nickname
META:state
META:url
META:wphone
META:zip
_signature
_status
_trk/qrylastchange
_trk/recentQuery
be:deskbar_item_status
last_modified
name
size
</pre>
<ul>
<li><b>mkindex</b> - 为磁卷或者分区的索引添加属性。 </li>
</ul>
<pre>Usage: mkindex [options] &lt;attribute&gt;
Creates a new index for the specified attribute.
-d, --volume=PATH a path on the volume to which the index will be added,
defaults to current volume.
-t, --type=TYPE the type of the attribute being indexed. One of "int",
"llong", "string", "float", or "double".
Defaults to "string".
--copy-from path to volume to copy the indexes from.
-v, --verbose print information about the index being created
</pre>
<p>只有具有该属性的 <b>新建</b> 文件才可以自动添加到该索引中!
<br />
现存的文件必须通过手动的复制该文件,然后删除原件才可以添加到索引中。当然,您也可以使用 <span class="cli">reindex</span> 命令。
</p>
<ul>
<li><b>reindex</b> - 把已存在文件的属性添加到新建的磁卷或者分区的索引中。</li>
</ul>
<pre>Usage: reindex [-rvf] attr &lt;list of filenames and/or directories&gt;
-r enter directories recursively
-v verbose output
-f create/update all indices from the source volume,
"attr" is the path to the source volume
</pre>
<ul>
<li><b>rmindex</b> - 从磁卷或者分区的索引中删除属性。</li>
</ul>
<pre>Usage: rmindex [OPTION]... INDEX_NAME
Removes the index named INDEX_NAME from a disk volume. Once this has been
done, it will no longer be possible to use the query system to search for
files with the INDEX_NAME attribute.
-d, --volume=PATH a path on the volume from which the index will be
removed
-h, --help display this help and exit
-p, --pattern INDEX_NAME is a pattern
-v, --verbose print information about the index being removed
INDEX_NAME is the name of a file attribute.
If no volume is specified, the volume of the current directory is assumed.</pre>
</div>
</div>
<div class="nav">
<div class="inner"><span>
« <a href="attributes.html">Attributes属性</a>
:: <a href="contents.html" class="uplink">内容</a>
:: <a href="queries.html">查询</a> »
</span></div>
</div>
</body>
</html>