make html in doc/man using mandoc (sans Toc feature)
[oweals/gnunet.git] / doc / man / gnunet-search.1
1 .TH GNUNET-SEARCH "1" "February 25, 2012" "0.9.6" "GNUnet"
2 .SH NAME
3 gnunet\-search \- a command line interface to search for content on GNUnet
4 .SH SYNOPSIS
5 .B gnunet\-search
6 [\fIOPTIONS\fR] [+]\fIKEYWORD\fR [[+]\fIKEYWORD\fR]*
7
8 .B gnunet\-search
9 [\fIOPTIONS\fR] [+]\fIURI\fR
10 .SH DESCRIPTION
11 .PP
12 Search for content on GNUnet. The keywords are case\-sensitive.
13 gnunet\-search can be used both for a search in the global namespace
14 as well as for searching a private subspace.
15 .TP
16 \fB\-a \fILEVEL\fR, \fB\-\-anonymity=\fILEVEL\fR
17
18 The \fB\-a\fR option can be used to specify additional anonymity
19 constraints. If set to 0, GNUnet will try to download the file as fast
20 as possible, including using non-anonymous methods.  If you set it to
21 1 (default), you use the standard anonymous routing algorithm (which
22 does not explicitly leak your identity).  However, a powerful
23 adversary may still be able to perform traffic analysis (statistics)
24 to over time infer data about your identity.  You can gain better
25 privacy by specifying a higher level of anonymity, which increases the
26 amount of cover traffic your own traffic will get, at the expense of
27 performance.  Note that your download performance is not only
28 determined by your own anonymity level, but also by the anonymity
29 level of the peers publishing the file.  So even if you download with
30 anonymity level 0, the peers publishing the data might be sharing with
31 a higher anonymity level, which in this case will determine
32 performance.  Also, peers that cache content in the network always use
33 anonymity level 1.
34
35 This option can be used to limit requests further than that. In
36 particular, you can require GNUnet to receive certain amounts of
37 traffic from other peers before sending your queries. This way, you
38 can gain very high levels of anonymity \- at the expense of much more
39 traffic and much higher latency. So set it only if you really believe
40 you need it.
41
42 The definition of ANONYMITY\-RECEIVE is the following.  0 means no
43 anonymity is required.  Otherwise a value of 'v' means that 1 out of v
44 bytes of "anonymous" traffic can be from the local user, leaving 'v-1'
45 bytes of cover traffic per byte on the wire.  Thus, if GNUnet routes n
46 bytes of messages from foreign peers (using anonymous routing), it may
47 originate n/(v-1) bytes of queries in the same time\-period. The
48 time\-period is twice the average delay that GNUnet defers forwarded
49 queries.
50
51 The default is 1 and this should be fine for most users.  Also notice
52 that if you choose very large values, you may end up having no
53 throughput at all, especially if many of your fellow GNUnet\-peers all
54 do the same.
55
56 .TP
57 \fB\-c \fIFILENAME\fR, \fB\-\-config=\fIFILENAME\fR
58 use config file (defaults: ~/.config/gnunet.conf)
59
60 .TP
61 \fB\-h\fR, \fB\-\-help\fR
62 print help page
63
64 .TP
65 \fB\-L \fILOGLEVEL\fR, \fB\-\-loglevel=\fILOGLEVEL\fR
66 Change the loglevel.  Possible values for LOGLEVEL are
67 ERROR, WARNING, INFO and DEBUG.
68
69 .TP
70 \fB\-o \fIFILENAME\fR, \fB\-\-output=\fIFILENAME\fR
71 Writes a GNUnet directory containing all of the search results to FILENAME.
72
73 .TP
74 \fB\-n\fR, \fB\-\-no-network\fR
75 Only search locally, do not forward requests to other peers.
76
77 .TP
78 \fB\-N \fIVALUE\fR, \fB\-\-results=\fIVALUE\fR
79 automatically terminate the search after receiving VALUE results.
80
81 .TP
82 \fB\-t \fIDELAY\fR, \fB\-\-timeout=\fIDELAY\fR
83 Automatically timeout search after DELAY.  The value given must be a
84 number followed by a space and a time unit, for example "500 ms".
85 Note that the quotes are required on the shell.  Otherwise the search
86 runs until gnunet\-search is aborted with CTRL\-C.
87
88 .TP
89 \fB\-v\fR, \fB\-\-version\fR
90 print the version number
91
92 .TP
93 \fB\-V\fR, \fB\-\-verbose\fR
94 print meta data from search results as well
95 .SH NOTES
96
97 You can run gnunet\-search with an URI instead of a keyword.  The URI
98 can have the format for a namespace search or for a keyword search.
99 For a namespace search, the format is
100 gnunet://fs/sks/NAMESPACE/IDENTIFIER.  For a keyword search, use
101 gnunet://fs/ksk/KEYWORD[+KEYWORD]*.  If the format does not correspond
102 to a GNUnet URI, GNUnet will automatically assume that keywords are
103 supplied directly.
104
105 If multiple keywords are passed, gnunet-search will look for content
106 matching any of the keywords.  The prefix "+" makes a keyword
107 mandatory.
108
109 # gnunet\-search "Das Kapital"
110
111 searches for content matching the keyword "Das Kapital".  Whereas
112
113 # gnunet\-search +Das +Kapital
114
115 Searches for content matching both mandatory keywords "Das" and "Kapital".
116
117 Search results are printed by gnunet\-search like this:
118 .P
119 .ad l
120         gnunet\-download \-o "COPYING" gnunet://fs/chk/HASH1.HASH2.SIZE
121
122                 Description: The GNU General Public License
123
124                 Mime-type: text/plain
125 .ad b
126
127 The first line contains the command to run to download the file.  The
128 suggested filename in the example is COPYING.  The GNUnet URI consists
129 of the key and query hash of the file and finally the size of the
130 file.  After the command to download the file GNUnet will print
131 meta\-data about the file as advertised in the search result, here
132 "The GNU General Public License" and the mime\-type (see the options
133 for gnunet\-publish on how to supply meta-data by hand).
134
135 .SH FILES
136 .TP
137 ~/.config/gnunet.conf
138 GNUnet configuration file; specifies the default value for the timeout
139 .SH "REPORTING BUGS"
140 Report bugs to <https://bugs.gnunet.org/> or by sending electronic mail to <gnunet\-developers@gnu.org>
141 .SH "SEE ALSO"
142 \fBgnunet\-fs\-gtk\fP(1), \fBgnunet\-publish\fP(1), \fBgnunet\-download\fP(1), \fBgnunet.conf\fP(5),
143 The full documentation for
144 .B gnunet
145 is maintained as a Texinfo manual.  If the
146 .B info
147 and
148 .B gnunet
149 programs are properly installed at your site, the command
150 .IP
151 .B info gnunet
152 .PP
153 should give you access to the complete handbook,
154 .IP
155 .B info gnunet-c-tutorial
156 .PP
157 will give you access to a tutorial for developers.
158 .PP
159 Depending on your installation, this information is also
160 available in
161 \fBgnunet\fP(7) and \fBgnunet-c-tutorial\fP(7).