GNUNET-SEARCH(1)
GNUNET-SEARCH π β¨
okay bestie, listen. this is the gnunet-search page from section 1 of the General Commands Manual β like, the actual manual page, not some random blog. sit down, grab a strawberry π, we're doing this.
β¨ NAME β¨
gnunet-search β a command line interface to search for content on GNUnet π¦
πΈ SYNOPSIS πΈ
gnunet-search [-a LEVEL | --anonymity=LEVEL] [-b | --bookmark-only]
[-c FILENAME | --config=FILENAME]
[-F FORMAT | --dir-printf=FORMAT]
[-f FORMAT | --printf=FORMAT] [-h | --help]
[-i FORMAT | --iter-printf=FORMAT]
[-L LOGLEVEL | --loglevel=LOGLEVEL]
[-l FILENAME | --logfile=FILENAME]
[-o FILENAME | --output=FILENAME] [-n | --no-network]
[-N VALUE | --results=VALUE] [-s | --silent]
[-t DELAY | --timeout=DELAY] [-v | --version]
[-V | --verbose] β¨KEYWORDβ© β¨+KEYWORDβ© | β¨URIβ© β¨+URIβ©
π DESCRIPTION π
so the whole point of this girl is: search for content on GNUnet. that's it, that's the job. π«Ά
β οΈ the keywords are case-sensitive. yes fr fr, capital letters matter, do not come crying to me.
gnunet-search can be used both for a search in the global namespace as well as for searching a private subspace. iconic duality tbh. the options are as follows:
π OPTIONS π
-a LEVEL,--anonymity=LEVELβ this one can be used to specify additional anonymity constraints, and the default is1. if you set it to0, 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 to1(default), you use the standard anonymous routing algorithm (which does not explicitly leak your identity). however β and this is the part you need to hear β 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 above1). 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. but also?? it can significantly reduce performance, as your requests will be delayed until sufficient cover traffic is available π. the specific numeric value (for anonymity levels above1) is simple: given an anonymity level L (above1), each request FS makes on your behalf must be hidden inL-1equivalent 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 level1.-b,--bookmark-onlyβ do not search, print only the URI that points to the search with the given keywords π.-c FILENAME,--config=FILENAMEβ use the configuration file FILENAME (default:~/.config/gnunet.conf).-F FORMAT,--dir-printf=FORMATβ write the search results for directories according to FORMAT. the directives supported here are identical to those supported in the--printfargument (please refer to it for more information, bestie, it's right there). if missing,--dir-printfdefaults to--printf. if--printfis missing too,--dir-printfdefaults toβ#%n:\ngnunet-download -o "%f" -R %u\n\nβπ.-f FORMAT,--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. no magic, no drama.
%%β a percent sign%aβ the complete list of all the printable metadata properties available, displayed according to the--iter-printfargument; 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-printfargument; 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. same energy, different sigil π
if missing, --printf defaults to β#%n:\ngnunet-download -o "%f" %u\n\nβ.
-h,--helpβ print the help page π«Ά.-i FORMAT,--iter-printf=FORMATβ when theβ%aβorβ%jβformat specifiers appear in--printfor--dir-printf, list each metadata property according to FORMAT, in which theβ\βdirectives are interpreted as in--printfand--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. yes, again. consistent queen β¨
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 π.
-L LOGLEVEL,--loglevel=LOGLEVELβ change the loglevel. possible values for LOGLEVEL areERROR,WARNING,INFOandDEBUG.-l FILENAME,--logfile=FILENAMEβ write logs to FILENAME π.-o FILENAME,--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. introvert mode, valid π .-N VALUE,--results=VALUEβ automatically terminate the search after receiving VALUE results π’.-s,--silentβ enable silent mode and do not print any result (the--outputargument is required) π€«.-t DELAY,--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). if0or omitted the search runs untilgnunet-searchis aborted withCTRL-Cβ¨οΈ.-v,--versionβ print the version number.-V,--verboseβ appendβ%a\nβto the default--printfand--dir-printfarguments β ignored when these are provided by the user. so it only does anything if you didn't already pick your own format, iykyk π
π¦ uris vs keywords, bestie π¦
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. no cap, it just figures it out π
if multiple keywords are passed, gnunet-search will look for content matching any of the keywords. the β+β prefix makes a keyword mandatory π₯
π FILES π
~/.config/gnunet.confβ GNUnet configuration file; specifies the default value for the timeout.
β¨ EXAMPLES β¨
Okay bestie, let's get into the actual examples because this is where gnunet-search really shows off its main character energy. π
πΈ Example 1 πΈ
$ gnunet-search 'Das Kapital'
This one searches for content that matches the keyword βDas Kapitalβ β like, the whole phrase as one keyword. Iconic. β¨
πΈ Example 2 πΈ
$ gnunet-search Das Kapital
No quotes this time, so it searches for content matching either the keyword βDasβ or the keyword βKapitalβ. It's giving OR energy. π₯
πΈ Example 3 πΈ
$ gnunet-search +Das +Kapital
The plus signs make both keywords mandatory, so it searches for content matching both βDasβ and βKapitalβ. It's giving AND energy, periodt. π
Now, search results are printed by gnunet-search like this:
gnunet-download -o "COPYING" gnunet://fs/chk/HASH1.HASH2.SIZE
Description: The GNU General Public License
Mime-type: text/plain
...
The first line is literally the command you run to download the file. The suggested filename in this example is βCOPYINGβ. The GNUnet URI is made up of the key and query hash of the file and finally the size of the file. If you passed the --verbose option, then after the download command, GNUnet will print metadata about the file as advertised in the search result. In this example the metadata is the description (βThe GNU General Public Licenseβ) and the mime-type (βtext-plainβ). For how to supply metadata by hand, go peek at the options for gnunet-publish(1). π
The --printf (-f), --dir-printf (-F) and --iter-printf (-i) arguments are these powerful tools for manipulating the output printed. For instanceβ¦
π Example 4 π
$ gnunet-search -f '%f (%s bytes)\n' commons
This will print a simple list of the results that match the βcommonsβ keyword, with only the file name and the size printed, without any URI. So clean, so minimal, we love. β¨
Or, for instanceβ¦
π Example 5 π
#!/bin/sh
{
printf '<list>'
gnunet-search -f '
<file uri="%u">
<filename len="%l">%f</filename>
<size>%s</size>
<mimetype>%m</mimetype>
<result_id>%n</result_id>
<metadata>%a
</metadata>
</file>' \
-i '
<property tid="%i" type="%t">
<content len="%l">%p</content>
<property_id>%n</property_id>
<provided_by>%w</provided_by>
</property>' \
-t '2 s' commons
printf '\n</list>\n'
} > commons.xml
This will run for two seconds and then create a file named commons.xml, containing the search results that match the βcommonsβ keyword in XML format. It's giving structured data realness. π
π SEE ALSO π
Okay so you're gonna wanna check out these other pages, bestie, because they're all connected in the GNUnet cinematic universe:
The full documentation for GNUnet is maintained as a Texinfo manual. If the info(1) and gnunet packages are properly installed at your site, the command
info gnunet
should give you access to the complete handbook. And
info gnunet-c-tutorial
will give you access to a tutorial for developers. Depending on your installation, this information is also available in gnunet(7) and gnunet-c-tutorial(7). Slay. πβ¨
π BUGS π
Found a bug? Don't be shy, report it by using https://bugs.gnunet.org or by sending electronic mail to β¨gnunet-developers@gnu.orgβ©. They'll appreciate it, fr fr. π
Okay bestie, that's the whole vibe. This page is from the Debian package, dated February 12, 2022, and it's for GNUNET-SEARCH(1). Now go search something iconic. π«Άπ
π¦ where this page comes from
- alpine 3.24: gnunet-doc 0.27.0-r0 Β· AGPL-3.0-only
- debian bookworm: gnunet 0.19.3-2 Β· AGPL-3.0-or-later
- debian trixie: gnunet 0.20.0-7 Β· AGPL-3.0-or-later
- nixos 26.05: gnunet 0.26.2
- nixpkgs unstable: gnunet 0.26.2
- opensuse-leap 16.0: gnunet 0.23.1-bp160.1.18 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: gnunet 0.23.1-bp160.1.18 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: gnunet 0.23.1-bp160.1.18 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: gnunet 0.23.1-bp160.1.18 Β· AGPL-3.0-or-later
- ubuntu noble: gnunet 0.20.0-4.1build3 Β· AGPL-3.0-or-later
- ubuntu questing: gnunet 0.20.0-7
- ubuntu resolute: gnunet 0.20.0-8 Β· AGPL-3.0-or-later
- ubuntu stonking: gnunet 0.20.0-9 Β· AGPL-3.0-or-later
- π the page's license: GPL3.0-or-later OR FDL1.3-or-later
- Copyright (C) 2001-2019 GNUnet e.V
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms