Search for content on GNUnet. The keywords are case-sensitive. gnunet-search can be used both for a
search in the global namespace as well as for searching a private subspace. The options are as follows:
-aLEVEL | --anonymity=LEVEL
This option can be used to specify additional anonymity constraints. The default is 1. If set
to 0, GNUnet will publish the file non-anonymously and in fact sign the advertisement for the
file using your peer's private key. This will allow other users to download the file as fast as
possible, including using non-anonymous methods (discovery via DHT and CADET transfer). If you
set it to 1 (default), you use the standard anonymous routing algorithm (which does not
explicitly leak your identity). However, a powerful adversary may still be able to perform
traffic analysis (statistics) to over time discovery your identity. You can gain better privacy
by specifying a higher level of anonymity (using values above 1). This tells FS that it must
hide your own requests in equivalent-looking cover traffic. This should confound an adversaries
traffic analysis, increasing the time and effort it would take to discover your identity.
However, it also can significantly reduce performance, as your requests will be delayed until
sufficient cover traffic is available. The specific numeric value (for anonymity levels above 1)
is simple: Given an anonymity level L (above 1), each request FS makes on your behalf must be
hidden in L-1 equivalent requests of cover traffic (traffic your peer routes for others) in the
same time-period. The time-period is twice the average delay by which GNUnet artificially delays
traffic. Note that regardless of the anonymity level you choose, peers that cache content in the
network always use anonymity level 1.
-b | --bookmark-only
Do not search, print only the URI that points to the search with the given keywords.
-cFILENAME | --config=FILENAME
Use the configuration file FILENAME (default: ~/.config/gnunet.conf).
-FFORMAT | --dir-printf=FORMAT
Write the search results for directories according to FORMAT. The directives supported here are
identical to those supported in the --printf argument (please refer to it for more information).
If missing, --dir-printf defaults to --printf. If --printf is missing too --dir-printf defaults
to ‘#%n:\ngnunet-download -o "%f" -R %u\n\n’.
-fFORMAT | --printf=FORMAT
Write the search results according to FORMAT, in which ‘\’ and ‘%’ directives are interpreted as
follows:
\\ a literal backslash (‘\’)
\a an alarm bell
\b a backspace
\e an escape
\f a form feed
\n a newline
\r a carriage return
\t a horizontal tab
\v a vertical tab
\0 an ASCII NUL.
\N... the character whose ASCII code is N..., expressed in octal digits
\xX... the character whose ASCII code is X..., expressed in hexadecimal digits
Note: The ‘\’ character followed by any other character not listed above is treated as an
ordinary character, so both characters are printed.
%% a percent sign
%a the complete list of all the printable metadata properties available, displayed according
to the --iter-printf argument; this specifier optionally supports metatype filtering via
hash sign (e.g. ‘%2#a’ prints all embedded file names, if present - see libextractor's
metatypes for the complete list of numerical identifiers)
%f the file's name
%j the first printable metadata property available, displayed according to the --iter-printf
argument; this specifier optionally supports metatype filtering via hash sign (e.g.
‘%5#j’ prints a book title, if present); see libextractor's metatypes for the complete
list of numerical identifiers)
%l the file name's length
%m the file's mime type
%n the search result number
%s the file's size in bytes
%u the file's URI
Note: The ‘%’ character followed by any other character not listed above is treated as an
ordinary character, so both characters are printed.
If missing, --printf defaults to ‘#%n:\ngnunet-download -o "%f" %u\n\n’.
-h | --help
Print the help page.
-iFORMAT | --iter-printf=FORMAT
When the ‘%a’ or ‘%j’ format specifiers appear in --printf or --dir-printf, list each metadata
property according to FORMAT, in which the ‘\’ directives are interpreted as in --printf and
--dir-printf, while the ‘%’ directives are interpreted as follows:
%% a percent sign
%p the property's content
%l the property content's length in bytes
%i the property type's unique identifier
%n the property number
%t the property type (available only if compiled with libextractor)
%w the name of the plugin that provided the information
Note: The ‘%’ character followed by any other character not listed above is treated as an
ordinary character, so both characters are printed.
If missing, --iter-printf defaults to ‘ %t: %p\n’ or ‘ MetaType #%i: %p\n’, depending on
whether the program was compiled with libextractor or not.
-LLOGLEVEL | --loglevel=LOGLEVEL
Change the loglevel. Possible values for LOGLEVEL are ERROR, WARNING, INFO and DEBUG.
-lFILENAME | --logfile=FILENAME
Write logs to FILENAME.
-oFILENAME | --output=FILENAME
Writes a GNUnet directory containing all of the search results to FILENAME (e.g. ‘gnunet-search
--output=commons.gnd commons’).
-n | --no-network
Only search locally, do not forward requests to other peers.
-NVALUE | --results=VALUE
Automatically terminate the search after receiving VALUE results.
-s | --silent
Enable silent mode and do not print any result (the --output argument is required).
-tDELAY | --timeout=DELAY
Automatically timeout search after DELAY. The value given must be a number followed by a space
and a time unit, for example "500 ms". Note that the quotes are required on the shell. Without a
unit it defaults to microseconds (1000000 = 1 second). If 0 or omitted the search runs until
gnunet-search is aborted with CTRL-C.
-v | --version
print the version number
-V | --verbose
append ‘%a\n’ to the default --printf and --dir-printf arguments – ignored when these are
provided by the user
It is possible to run gnunet-search with an URI instead of a keyword. The URI can have the format for a
namespace search or for a keyword search. For a namespace search, the format is
gnunet://fs/sks/NAMESPACE/IDENTIFIER
For a keyword search, use
gnunet://fs/ksk/KEYWORD[+KEYWORD]*
If the format does not correspond to a GNUnet URI, GNUnet will automatically assume that keywords are
supplied directly.
If multiple keywords are passed, gnunet-search will look for content matching any of the keywords. The
‘+’ prefix makes a keyword mandatory.