summaryrefslogtreecommitdiff
path: root/Base/usr
diff options
context:
space:
mode:
authorAlec Murphy <alec@checksum.fail>2022-11-10 15:36:07 -0500
committerLinus Groh <mail@linusgroh.de>2022-12-04 12:08:48 +0000
commit8677dbfc7ffb4119b5049fdd7eb10527ee4a1f21 (patch)
tree1ce3a1092f46f12ff704096acd9ae444742c613d /Base/usr
parente3112a3d2e7ec5c6958ed075a52b380f7d80557b (diff)
downloadserenity-8677dbfc7ffb4119b5049fdd7eb10527ee4a1f21.zip
Utilities: Add strings
Diffstat (limited to 'Base/usr')
-rw-r--r--Base/usr/share/man/man1/strings.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/Base/usr/share/man/man1/strings.md b/Base/usr/share/man/man1/strings.md
new file mode 100644
index 0000000000..abcaf5284b
--- /dev/null
+++ b/Base/usr/share/man/man1/strings.md
@@ -0,0 +1,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
+```