LSMTD(8)

πŸ’– LSMTD β€” the mtd-utils girlies' guide to listing memory technology devices πŸ’–

okay so this is lsmtd(8) from the System Manager's Manual and bestie it's SO much simpler than it looks. it lives in section 8 of the manual (that's the sysadmin section, iykyk) and it's literally just "tell me about my MTD and UBI devices". we're gonna get through this together 🫢


✨ NAME ✨

lsmtd β€” list memory technology devices 🌸


πŸ“œ SYNOPSIS πŸ“œ

lsmtd [options] [device...]

πŸ’… DESCRIPTION πŸ’…

lsmtd lists info about all available MTD and UBI devices, or just the ones you name. the way it works is: lsmtd reads the sysfs filesystem to gather its info. and if sysfs isn't available? no worries bestie, it falls back to the procfs filesystem and ioctl interfaces instead. adaptable queen πŸ‘‘

by default the command prints all MTD and UBI devices in a pretty-printed list format. very demure, very mindful.

ok but listen β€” the default output is subject to change. so whenever possible, avoid using default outputs in your scripts, fr fr. always explicitly define expected columns by using --output columns-list in environments where a stable output is required. protect your scripts, protect your peace πŸŽ€

use lsmtd --help to get a list of all available columns. that's your cheat sheet.


πŸ‘‘ OPTIONS πŸ‘‘

  • -b, --bytes β€” print columns with size quantities (like erase block size) in bytes instead of a human-readable format. numbers, numbers, numbers πŸ”’
  • -h, --help β€” display a help text and exit. the classic escape hatch.
  • -i, --ascii β€” only use ascii characters for pretty printing. for when the fancy box-drawing characters aren't it πŸ₯²
  • -J, --json β€” use JSON output format. all potentially unsafe characters in string values are escaped with JSON escape sequences or hex-escaped (\u<code>). machine-readable slay ✨
  • -l, --list β€” use a pretty-printed list output format. this is the default, so it's the main character πŸ‘‘
  • -m, --no-ubi β€” do not display information about UBI devices or volumes. MTD only, no UBI energy.
  • -n, --noheadings β€” do not print column headings when using raw or list output format. headers? never heard of her.
  • -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). the plus sign is doing the heavy lifting there πŸ’…
  • -O, --output-all β€” output all available columns. give me EVERYTHING 😀
  • -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. metric units, metric mindset 🌈
  • -V, --version β€” print version information and exit.
  • -x, --sort column β€” sort output lines by column. organize, bestie πŸ“š

πŸ“ 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. yes, even then. that's just how it is 🫠


🫢 AUTHORS 🫢

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


πŸ› REPORTING BUGS πŸ›

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


πŸ“¦ AVAILABILITY πŸ“¦

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


Copyright Β© 2017 David Oberhollenzer - sigma star gmbh

License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl2.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. no cap, zero warranty, read it and weep 😭

πŸ‘€ SEE ALSO πŸ‘€

lsblk(8), ls(1)


and that's the whole page bestie!! πŸ’– this was mtd-utils, dated April 2017, and the page is LSMTD(8). go forth and list your memory technology devices, you absolute icon πŸ¦‹βœ¨