RAFIND2(1)
๐ rafind2 โ bestie's guide to hunting bytes (RAFIND2(1)) ๐
okay so you found the manual for rafind2, and honestly? this little tool is a whole main character. it's an advanced command-line byte pattern search in files, and it does NOT miss. we're in section 1 of the manual, she's iconic, let's go ๐
โจ NAME โจ
rafind2 โ advanced command-line byte pattern search in files ๐ฆ
๐ธ SYNOPSIS ๐ธ
rafind2 [-mBXnzZhqv] [-a align] [-b size] [-f from] [-t to]
[-[e|s|S] str] [-x hex] [-E] [-F file] [-g] [-i] [-I str] [-j]
[-L] [-M str] [-R str] [-r] [-c] [-V s:num | s:num1,num2]
-|file|dir ...
yes, that's a lot of flags. yes, you're gonna learn all of them. periods only, bestie. ๐
๐ DESCRIPTION ๐
A versatile utility for searching byte patterns in files, supporting alignment, offset ranges, string and hexadecimal queries, and customizable output formats. it's giving swiss army knife but make it bytes ๐คโจ
The following options are available: ๐
โจ OPTIONS โจ
-a alignโ Only accept aligned hits. if it ain't lined up, it ain't invited ๐ โโ๏ธ-b sizeโ Set block size. choose how much you're chewing at a time ๐-Bโ Use big endian instead of little endian (See-V). big-endian girlies rise ๐-cโ Disable colorful output (mainly for for-X). yes, "for for". we keep it exactly as written, no cap ๐ also: no color today, we're being minimal-e regexโ Search for regex matches (can be used multiple times). stack 'em, the more the merrier ๐ง-Eโ Perform a search using an esil expression. esil arc, iykyk ๐-f fromโ Start searching from addressfrom. we begin HERE and nowhere earlier โญ-F fileโ Read the contents of the file and use it as keyword. let the file speak for itself, periodt ๐-gโ Insert the replacement and resize the file (only with-R). careful bestie, this one actually TOUCHES your file ๐ญ respect it!!!-hโ Show help message. lost? hello? she's here ๐ซถ-iโ Identify filetype (r2 -nqcpm file). detective mode ๐-I strโ Filter files by rbin info (arch/type/bits/...) before searching. vibe check on the metadata first ๐-jโ Output in JSON. for when a machine is reading, not your eyes ๐ค-Lโ List all IO plugins (same as r2 for now). window shopping, but plugins ๐๏ธ-mโ Magic search, file-type carver. very mysterious of her ๐ฎ-M strโ Set a binary mask to be applied on keywords. shape the keyword, don't change it ๐ธ-R strโ Replace each hit with the given string (prefix withh:hex,w:wide,s:string). glow-up your bytes โจ-nโ Do not stop on read errors. nothing can kill her momentum ๐ฅ-rโ Print using radare commands. output that r2 can literally eat ๐ฝ๏ธ-s strโ Search for a string (more than one string can be passed). the classic. the blueprint ๐-S strโ Search for a wide string (more than one string can be passed). extra wide, extra slay ๐-t toโ Stop search at addressto. we end HERE, no further โ-qโ Quiet mode: fewer output do not show headings or filenames. she's being quiet, okay? shhh ๐-vโ Show version information. who is she? ๐-V s:num | s:num1,num2โ Search for a value or range in the specified endian (-V 4:123or-V 4:100,200). numbers, but with range and endian drama ๐-x hexโ Search for hexpair string (909090) with optional nibble mask using dots (41.42) (can be used multiple times). raw hex hunting ๐ธ-Xโ Show hexdump of search results. the receipts, rendered pretty ๐-zโ Search for zero-terminated strings. the classic C-string look โจ-Zโ Show string found on each search hit. every hit gets a lil speech bubble ๐ฌ
๐ ENVIRONMENT ๐
rafind2 does not use any environment variables. literally zero. she is self-sufficient, she needs NO external validation ๐
โจ
๐ EXAMPLES ๐
Search for a specific string in a file:
$ rafind2 -s "search_string" file.txt
Search for a hex pattern in all the files from directory:
$ rafind2 -x "909090" directory_path
Search for hex pattern with nibble mask (dot masks single nibble):
$ rafind2 -x "41.42" file.bin
Identify the file type:
$ rafind2 -i binary_file
Search for the little endian 123 stored in a 4-byte word:
$ rafind2 -V 4:123 file.bin
Search for a range of values (100-200) in a 4-byte word:
$ rafind2 -V 4:100,200 file.bin
Search for zero-terminated strings and show each string found:
$ rafind2 -zZ file.bin
Search using regex pattern:
$ rafind2 -e "password|passwd" file.txt
Show hexdump of search results:
$ rafind2 -X -s "hello" file.bin
Replace string hits in a file:
$ rafind2 -s "old" -R "new" file.bin
๐ฆ SEE ALSO ๐ฆ
radare2(1) โ her big sibling, go say hi ๐ซถ
๐ AUTHORS ๐
pancake <pancake@nopcode.org>
and that's the whole page, bestie ๐ RAFIND2(1) โ from section 1 of the manual, dated Feb 4, 2026. go search some bytes, you absolute superstar โญ
๐ฆ where this page comes from
- alpine 3.24: radare2-doc 6.1.6-r0 ยท GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later
- arch rolling: radare2 6.2.2-1 ยท GPL-3.0-only AND LGPL-3.0-only
- nixos 26.05: radare2 6.1.8
- nixpkgs unstable: radare2 6.2.4
- opensuse-leap 16.0: radare2 6.2.2-bp160.1.1 ยท GPL-3.0-only AND LGPL-3.0-only
- opensuse-leap 16.0: radare2 6.2.2-bp160.1.1 ยท GPL-3.0-only AND LGPL-3.0-only
- opensuse-leap 16.0: radare2 6.2.2-bp160.1.1 ยท GPL-3.0-only AND LGPL-3.0-only
- opensuse-leap 16.0: radare2 6.2.2-bp160.1.1 ยท GPL-3.0-only AND LGPL-3.0-only
- ubuntu stonking: radare2 6.1.8+ds-1 ยท LGPL-3.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms