Strings (Unix): Difference between revisions

Content deleted Content added
Updated description such as the types of files on which this can be run.
Added difference between cat and strings command on text files.
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 to terminal but '''strings''' ignores 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