util-linux Collection

I was looking at the source repository for the util-linux package <https://github.com/util-linux/util-linux>, and discovered that the collection of tools is larger than I thought. There are also a few items listed that aren’t (yet?) in the installed package on my Debian Unstable system. For example, I recently discovered that the “mount” command not only does mounting and unmounting of volumes, but without any options it will also output a list of all current mounts, and this can be done by nonprivileged users. But util-linux includes a more powerful command for this purpose called “findmnt”, which includes more elaborate options for obtaining information about mounted filesystems, including monitoring changes to them. In that repo, I also found “lsfd”, which is meant to be a replacement for “lsof” that takes advantage of newer capabilities specific to the Linux kernel. Also there is “lsns”, which displays information about namespaces. Firefox, in particular, seems to use a whole lot of these, presumably as part of its mechanisms for isolating its processes from each other. This is in addition to other useful ones like “lscpu”, “lspci” “lsusb”, “lsmem”, “lsblk”, “lslocks” and “lsirq”. Interesting that quite a few of these commands support JSON output format. If you don’t want to go this far, you can explicitly specify which columns are included in the output; this is recommended if you want to parse the output in scripts, instead of relying on the default output format not changing. And yes, I have seen some over-elaborate scripts that went to a whole lot of trouble to extract the information they needed from some command, instead of using options in the command to output that information directly.
participants (1)
-
Lawrence D'Oliveiro