vfs: check userland buffers before reading them.
[haiku.git] / docs / userguide / en / index.html
blobc446eddd10e8db27fdc5b6c65ca51b1ed22ce1a3
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="en-US" xml:lang="en-US">
4 <head>
5 <!--
7 * Copyright 2008-2009, Haiku. All rights reserved.
8 * Distributed under the terms of the MIT License.
10 * Authors:
11 * Humdinger <humdingerb@gmail.com>
13 -->
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" />
17 <title>Index</title>
18 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19 <link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
20 </head>
21 <body>
23 <div id="banner">
24 <div><span>User guide</span></div>
25 </div>
27 <div class="nav">
28 <div class="inner">
29 <ul class="lang-menu">
30 <li class="now"><img src="../images/flags/gb.png" alt="" /> English</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="../es/index.html"><img src="../images/flags/es.png" alt="" />Español</a></li>
34 <li><a href="../fr/index.html"><img src="../images/flags/fr.png" alt="" />Français</a></li>
35 <li><a href="../it/index.html"><img src="../images/flags/it.png" alt="" />Italiano</a></li>
36 <li><a href="../hu/index.html"><img src="../images/flags/hu.png" alt="" />Magyar</a></li>
37 <li><a href="../pl/index.html"><img src="../images/flags/pl.png" alt="" />Polski</a></li>
38 <li><a href="../pt_PT/index.html"><img src="../images/flags/pt_PT.png" alt="" />Português</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>
48 </ul>
49 <span>
50 « <a href="attributes.html">Attributes</a>
51 :: <a href="contents.html" class="uplink">Contents</a>
52 :: <a href="queries.html">Queries</a> »
53 </span></div>
54 </div>
56 <div id="content">
57 <div>
59 <h1>Index</h1>
61 <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 />
62 The index is part of the filesystem and is kept for every volume/partition separately.</p>
64 <h2>
65 Indexing commands in Terminal</h2>
66 <p>There are several commands to manage the index:</p>
67 <ul>
68 <li><b>lsindex</b> - Displays the indexed attributes on the current volume/partition.<br />
69 These are the attributes that are indexed by default:</li>
70 </ul>
71 <pre class="terminal"> ~ -&gt;lsindex
72 BEOS:APP_SIG
73 MAIL:account
74 MAIL:cc
75 MAIL:chain
76 MAIL:draft
77 MAIL:flags
78 MAIL:from
79 MAIL:name
80 MAIL:pending_chain
81 MAIL:priority
82 MAIL:reply
83 MAIL:status
84 MAIL:subject
85 MAIL:thread
86 MAIL:to
87 MAIL:when
88 META:address
89 META:city
90 META:company
91 META:country
92 META:email
93 META:fax
94 META:group
95 META:hphone
96 META:name
97 META:nickname
98 META:state
99 META:url
100 META:wphone
101 META:zip
102 _signature
103 _status
104 _trk/qrylastchange
105 _trk/recentQuery
106 be:deskbar_item_status
107 last_modified
108 name
109 size
110 </pre>
111 <ul>
112 <li><b>mkindex</b> - Adds an attribute to the index of a volume/partition. </li>
113 </ul>
114 <pre>Usage: mkindex [options] &lt;attribute&gt;
115 Creates a new index for the specified attribute.
117 -d, --volume=PATH a path on the volume to which the index will be added,
118 defaults to current volume.
119 -t, --type=TYPE the type of the attribute being indexed. One of "int",
120 "llong", "string", "float", or "double".
121 Defaults to "string".
122 --copy-from path to volume to copy the indexes from.
123 -v, --verbose print information about the index being created
125 </pre>
126 <p>Only <b>new</b> files with that attribute come automatically into the index!<br />
127 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>.
128 </p>
129 <ul>
130 <li><b>reindex</b> - Puts the attributes of existing files into the newly created index of a volume/partition. </li>
131 </ul>
132 <pre>Usage: reindex [-rvf] attr &lt;list of filenames and/or directories&gt;
133 -r enter directories recursively
134 -v verbose output
135 -f create/update all indices from the source volume,
136 "attr" is the path to the source volume
138 </pre>
139 <ul>
140 <li><b>rmindex</b> - Removes an attribute from the index of a volume/partition.</li>
141 </ul>
142 <pre>Usage: rmindex [OPTION]... INDEX_NAME
144 Removes the index named INDEX_NAME from a disk volume. Once this has been
145 done, it will no longer be possible to use the query system to search for
146 files with the INDEX_NAME attribute.
148 -d, --volume=PATH a path on the volume from which the index will be
149 removed
150 -h, --help display this help and exit
151 -p, --pattern INDEX_NAME is a pattern
152 -v, --verbose print information about the index being removed
154 INDEX_NAME is the name of a file attribute.
156 If no volume is specified, the volume of the current directory is assumed.</pre>
158 </div>
159 </div>
161 <div class="nav">
162 <div class="inner"><span>
163 « <a href="attributes.html">Attributes</a>
164 :: <a href="contents.html" class="uplink">Contents</a>
165 :: <a href="queries.html">Queries</a> »
166 </span></div>
167 </div>
169 </body>
170 </html>