lsmtd - Man Page

list memory technology devices

Synopsis

lsmtd [options] [device...]

Description

lsmtd lists information about all available or the specified MTD and UBI devices. The lsmtd command reads the sysfs filesystem to gather information. Alternatively, the procfs filesystem and ioctl interfaces are used, should the sysfs filesystem not be available.

The command prints all MTD and UBI devices in a pretty-printed list format by default.

The default output is subject to change. So whenever possible, you should avoid using default outputs in your scripts. Always explicitly define expected columns by using --output columns-list in environments where a stable output is required.

Use lsmtd --help to get a list of all available columns.

Options

-b,  --bytes

Print columns with size quantities (e.g. erase block size) in bytes instead of a human-readable format.

-h,  --help

Display a help text and exit.

-i,  --ascii

Only use ascii characters for pretty printing.

-J,  --json

Use JSON output format. All potentially unsafe characters in string values are escaped with JSON escape sequences or hex-escaped (\u<code>).

-l,  --list

Use a pretty-printed list output format (default).

-m,  --no-ubi

Do not display information about UBI devices or volumes.

-n,  --noheadings

Do not print column headings when using raw or list output format.

-o,  --output list

Specify which output columns to print.  Use --help to get a list of all supported columns.

The default list of columns may be extended if list is specified in the format +list (e.g. lsmtd -o +EB-SIZE).

-O,  --output-all

Output all available columns.

-P,  --pairs

Produce output in the form of key="value" pairs. All potentially unsafe characters are hex-escaped (\x<code>).

-r,  --raw

Produce output in raw format. All potentially unsafe characters are hex-escaped (\x<code>).

-u,  --si-units

Display human readable sizes as powers of ten rather than powers of two.

-V,  --version

Print version information and exit.

-x,  --sort column

Sort output lines by column.

Notes

If the --bytes option is not specified, the JSON output format prints sizes as string values even if they do not have a suffix.

Authors

David Oberhollenzer <david.oberhollenzer@sigma-star.at>

Reporting Bugs

Report mtd-utils bugs to the Linux mtd mailing list.

Linux mtd mailing list: <linux-mtd@lists.infradead.org>

Linux mtd home page: <http://www.linux-mtd.infradead.org/>

Availability

The lsmtd command is part of the mtd-utils package and is available from ftp://ftp.infradead.org/pub/mtd-utils/.

See Also

lsblk(8), ls(1)

Info

April 2017 mtd-utils