1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" lang=
"pt-PT" xml:
lang=
"pt-PT">
7 * Copyright 2008-2009, Haiku. All rights reserved.
8 * Distributed under the terms of the MIT License.
11 * Humdinger <humdingerb@gmail.com>
14 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
15 <meta http-equiv=
"Content-Style-Type" content=
"text/css" />
16 <meta name=
"robots" content=
"all" />
18 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0" />
19 <link rel=
"stylesheet" type=
"text/css" href=
"../Haiku-doc.css" />
24 <div><span>User guide
</span></div>
29 <ul class=
"lang-menu">
30 <li class=
"now"><img src=
"../images/flags/pt_PT.png" alt=
"" /> Português
</li>
31 <li><a href=
"../ca/index.html"><img src=
"../images/flags/ca.png" alt=
"" />Català
</a></li>
32 <li><a href=
"../de/index.html"><img src=
"../images/flags/de.png" alt=
"" />Deutsch
</a></li>
33 <li><a href=
"../en/index.html"><img src=
"../images/flags/gb.png" alt=
"" />English
</a></li>
34 <li><a href=
"../es/index.html"><img src=
"../images/flags/es.png" alt=
"" />Español
</a></li>
35 <li><a href=
"../fr/index.html"><img src=
"../images/flags/fr.png" alt=
"" />Français
</a></li>
36 <li><a href=
"../it/index.html"><img src=
"../images/flags/it.png" alt=
"" />Italiano
</a></li>
37 <li><a href=
"../hu/index.html"><img src=
"../images/flags/hu.png" alt=
"" />Magyar
</a></li>
38 <li><a href=
"../pl/index.html"><img src=
"../images/flags/pl.png" alt=
"" />Polski
</a></li>
39 <li><a href=
"../pt_BR/index.html"><img src=
"../images/flags/pt_BR.png" alt=
"" />Português (Brazil)
</a></li>
40 <li><a href=
"../ro/index.html"><img src=
"../images/flags/ro.png" alt=
"" />Română
</a></li>
41 <li><a href=
"../sk/index.html"><img src=
"../images/flags/sk.png" alt=
"" />Slovenčina
</a></li>
42 <li><a href=
"../fi/index.html"><img src=
"../images/flags/fi.png" alt=
"" />Suomi
</a></li>
43 <li><a href=
"../sv_SE/index.html"><img src=
"../images/flags/sv_SE.png" alt=
"" />Svenska
</a></li>
44 <li><a href=
"../zh_CN/index.html"><img src=
"../images/flags/zh_CN.png" alt=
"" /> 中文 [中文]
</a></li>
45 <li><a href=
"../ru/index.html"><img src=
"../images/flags/ru.png" alt=
"" />Русский
</a></li>
46 <li><a href=
"../uk/index.html"><img src=
"../images/flags/uk.png" alt=
"" />Українська
</a></li>
47 <li><a href=
"../jp/index.html"><img src=
"../images/flags/jp.png" alt=
"" />日本語
</a></li>
50 «
<a href=
"attributes.html">Attributes
</a>
51 ::
<a href=
"contents.html" class=
"uplink">Contents
</a>
52 ::
<a href=
"queries.html">Queries
</a> »
58 <div class=
"box-info">The translation of this page isn't yet complete. Until it is, unfinished parts use the English original.
</div>
62 <p><a href=
"attributes.html">Attributes
</a> and
<a href=
"queries.html">Queries
</a> are key features of Haiku. While attributes are useful on their own, to display additional information on a file, for a query on them, they need to be indexed. It puts them into a lookup table, which in turn makes queries lightning fast.
<br />
63 The index is part of the filesystem and is kept for every volume/partition separately.
</p>
66 Indexing commands in Terminal
</h2>
67 <p>There are several commands to manage the index:
</p>
69 <li><b>lsindex
</b> - Displays the indexed attributes on the current volume/partition.
<br />
70 These are the attributes that are indexed by default:
</li>
72 <pre class=
"terminal"> ~ -
>lsindex
107 be:deskbar_item_status
113 <li><b>mkindex
</b> - Adds an attribute to the index of a volume/partition.
</li>
115 <pre>Usage: mkindex [options]
<attribute
>
116 Creates a new index for the specified attribute.
118 -d, --volume=PATH a path on the volume to which the index will be added,
119 defaults to current volume.
120 -t, --type=TYPE the type of the attribute being indexed. One of
"int",
121 "llong",
"string",
"float", or
"double".
122 Defaults to
"string".
123 --copy-from path to volume to copy the indexes from.
124 -v, --verbose print information about the index being created
127 <p>Only
<b>new
</b> files with that attribute come automatically into the index!
<br />
128 Existing files have to be added manually by copying them and deleting the originals after that. Alternatively you can use the command
<span class=
"cli">reindex
</span>.
131 <li><b>reindex
</b> - Puts the attributes of existing files into the newly created index of a volume/partition.
</li>
133 <pre>Usage: reindex [-rvf] attr
<list of filenames and/or directories
>
134 -r enter directories recursively
136 -f create/update all indices from the source volume,
137 "attr" is the path to the source volume
141 <li><b>rmindex
</b> - Removes an attribute from the index of a volume/partition.
</li>
143 <pre>Usage: rmindex [OPTION]... INDEX_NAME
145 Removes the index named INDEX_NAME from a disk volume. Once this has been
146 done, it will no longer be possible to use the query system to search for
147 files with the INDEX_NAME attribute.
149 -d, --volume=PATH a path on the volume from which the index will be
151 -h, --help display this help and exit
152 -p, --pattern INDEX_NAME is a pattern
153 -v, --verbose print information about the index being removed
155 INDEX_NAME is the name of a file attribute.
157 If no volume is specified, the volume of the current directory is assumed.
</pre>
163 <div class=
"inner"><span>
164 «
<a href=
"attributes.html">Attributes
</a>
165 ::
<a href=
"contents.html" class=
"uplink">Contents
</a>
166 ::
<a href=
"queries.html">Queries
</a> »