lsmount

is a simple formatter, colorizer and filter for /proc/mounts written in C

Features

Align

Each entry (device, mountpoint, fstype, mountoptions and the unused ones) can be aligned on top of each other.

Color

You can assign each column its own color.

Filter

You can skip devices that are in a comma-separated list.

Resolv

You can resolv device links like /dev/mapper/luks-foo → /dev/dm-0.

Vertical

You can get a vertical output for piped usage.

ISC license text

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Dependencies

  • libc
  • libconfig
  • libtinfo
  • debhelper
  • libc6-dev
  • libconfig-dev
  • libinfo-dev
  • asciidoc
  • xmlto
  • make

Why and why in C?

Since the advent of more and more pseudo-file systems (and systemd) the output of mount became confusing and the information important for everyday life was difficult to read out.

And yes, the implementation would be much simpler in most other programming and scripting languages, the only real reason for the choice is "because I can and want to do it so".