Strings (Unix): Difference between revisions

Content deleted Content added
tag as one source
m Example: rm <syntaxhighlight>
Line 33:
==Example==
Using ''strings'' to print sequences of characters that are at least 8 characters long (this command prints the system's [[BIOS]] information; should be run as root):
<syntaxhighlight lang="bash">
dd if=/dev/mem bs=1k skip=768 count=256 2>/dev/null | strings -n 8 | less
</syntaxhighlight>
 
dd if=/dev/mem bs=1k skip=768 count=256 2>[[/dev/null]] | strings -n 8 | [[less (Unix)|less]]
=== <span style="font-size:70%">file.txt</span> ===
 
<syntaxhighlight lang="c">
a
aa
aaa
aaaa
</syntaxhighlight>
 
<syntaxhighlight lang="bash">
strings file.txt # prints aaaa
</syntaxhighlight>
 
==See also==