xref: /original-bsd/usr.bin/strings/strings.1 (revision ba762ddc)
1.\" Copyright (c) 1980, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)strings.1	6.9 (Berkeley) 04/22/91
7.\"
8.Dd
9.Dt STRINGS 1
10.Os BSD 3
11.Sh NAME
12.Nm strings
13.Nd find printable strings in a file
14.Sh SYNOPSIS
15.Nm strings
16.Op Fl afo
17.Op Fl n Ar number
18.Op Ar file ...
19.Sh DESCRIPTION
20.Nm Strings
21displays the sequences of printable characters in each of the specified
22files, or in the standard input, by default.
23By default, a sequence must be at least four characters in length
24before being displayed.
25.Pp
26The options are as follows:
27.Bl -tag -width Ds
28.It Fl a
29By default,
30.Nm strings
31only searches the initialized data space of object files.
32The
33.Fl a
34option causes
35.Nm strings
36to search the entire object file.
37.It Fl f
38Each string is preceded by the name of the file
39in which it was found.
40.It Fl n
41Specifies the minimum number of characters in a sequence to be
42.Ar number ,
43instead of four.
44.It Fl o
45Each string is preceded by its decimal offset in the
46file.
47.El
48.Pp
49.Nm Strings
50is useful for identifying random binaries, among other things.
51.Sh SEE ALSO
52.Xr hexdump 1
53.Sh BUGS
54The algorithm for identifying strings is extremely primitive.
55.Sh HISTORY
56The
57.Nm
58command appeared in
59.Bx 3.0 .
60