blob: abcaf5284b239db656afc122e8e6dd013b5f8c92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
## Name
strings - find printable strings in files
## Synopsis
```**sh
$ strings [-n NUMBER] [-p] [-t FORMAT] [PATHS...]
```
## Description
`strings` looks for printable strings in each file specified in `PATHS` and writes them to standard output. If `PATHS` is not specified, input is read from standard input.
## Options
* `-n NUMBER`: Specify the minimum string length (4 is default).
* `-p`: Write the pathname for each file specified in `PATHS` to standard output.
* `-t FORMAT`: Write each string preceded by its byte offset from the start of the file in the specified `FORMAT`, where `FORMAT` matches one of the following: `d` (decimal), `o` (octal), or `x` (hexidecimal).
## Examples
Display the printable strings in /bin/strings with a minimum length of 8 characters:
```sh
$ strings -n 8 /bin/strings
```
Display the printable strings in a binary file, preceded by their byte offset in hexadecimal format:
```sh
$ strings -t x ~/Videos/test.webm
```
Display the printable strings in all .txt files in the current directory, preceded by their pathname:
```sh
$ strings -p *.txt
```
|