Strings (Unix): Difference between revisions

Content deleted Content added
Added difference between cat and strings command on text files.
m typo fix.
Line 22:
 
==Overview==
Strings are recognized by looking for sequences of at least 4 (by default) printable characters terminating in a NUL character (that is, [[null-terminated string]]s). Some implementations provide options for determining what is recognized as a printable character, which is useful for finding non-ASCII and wide character text. By default, it only prints the strings from the initialized and loaded sections of object files; for other types of files, it prints the strings from the whole file. But it doesn't make the behavior of [[Cat_(Unix)|cat]] and '''strings''' the same on regular text files. [[Cat_(Unix)|cat]] processes the non printable characters and output it to the terminal but '''strings''' ignoresignore them.
 
Common usage includes piping its output to {{mono|[[grep]]}} and {{mono|[[Fold (Unix)|fold]]}} or redirecting the output to a [[Computer file|file]].<ref>{{cite book