print the printable strings in a file
This is like the strings command, but allows you to specify the encoding of
strings that are looked for in the source file path
.
Allowed encodings are:
s Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of ISO-8859-X (this is what strings uses).
S Single 8-bit-byte characters.
b 16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE.
l (lower case letter L) 16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for examining binaries in Windows guests.
B 32-bit big endian such as UCS-4BE.
L 32-bit little endian such as UCS-4LE.
The returned strings are transcoded to UTF-8.
The strings
command has, in the past, had problems with parsing untrusted files. These are mitigated in the current version
of libguestfs, but see "CVE-2014-8484" in guestfs(3).
this |
A GuestfsSession object |
an array of returned strings, or NULL on error |