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