STRINGS(1plan9)

πŸ’– STRINGS(1plan9) πŸ’–

okay bestie, so this is strings from the Plan 9 manual, section 1 β€” and no cap, it's one of those tiny little tools that you end up obsessed with. it pulls the readable stuff out of files that are definitely not meant to be read by humans. πŸ¦‹


✨ NAME ✨

strings β€” extract printable strings πŸ’…


✨ SYNOPSIS ✨

strings [ file ... ]

🌸 DESCRIPTION 🌸

So here's the vibe: strings goes hunting through a file β€” and like, typically a binary file, the kind of cursed little thing you'd never open in an editor β€” and it finds and prints every string made of 6 or more consecutive printable UTF-encoded characters. if you don't hand it any file at all, it just reads from standard input by default. easy. 🫢

Now, what counts as "printable"? great question, bestie, because it's specific:

  • the ASCII characters from blank through tilde β€” that's hexadecimal 20 through 7E, inclusive πŸ‘‘
  • and all the other characters from value 00A0 to FFFF πŸ’œ

For every string it finds, strings tells you two things:

  1. the decimal offset within the file where that string starts πŸ“
  2. the actual text of the string itself πŸ’¬

And here's the one little plot twist you gotta know: if a string is longer than 70 runes, the line gets cut off with three dots (...) and then printing picks back up on the next line, starting with the offset of that continuation line. so long strings get wrapped, not truncated. slay. ✨

not me actually caring about runes in 2025 but here we are, it's giving attention to detail πŸ’…

πŸŽ€ SOURCE πŸŽ€

/src/cmd/strings.c

πŸ¦‹ SEE ALSO πŸ¦‹

  • nm(1) β€” go look at symbols next, it's the natural sequel fr fr 🫢

and that's the whole page, bestie!! πŸ’– this one came straight out of the Plan 9 manual, STRINGS(1plan9), and it's iconic, it ate, periodt. πŸŒˆβ­πŸŽ€

πŸ“¦ where this page comes from