The util-linux v2.40-rc1 was released just a few days ago. Let's explore the new features introduced in this release. We have a new small shared library in the project, liblastlog, to implement a replacement for the lastlog file and lastlog-related utils. The main goal is to fix the Y2038 issue and use a more advanced file format to store the log. The original lastlog implementation uses 32-bit…
This release comes with dramatic changes, and the most noticeable change is the support for a new kernel mount API in libmount. The classic mount(2) system call has been with us since the early days of Linux. This interface is quite simple: you specify the source, target, filesystem options, mount flags, and ask the kernel to do the job. Unfortunately, the interface is too simplistic. These days,…
The code of the popular command lsblk(8) has been completely rewritten. The result is more extendible and readable code. Now lsblk(8) keeps all block devices tree in memory before it's printed. It allows to modify and reorder the tree independently on the way how kernel (/sys filesystem) exports the tree to userspace. The new features based on this change are: devices de-duplication (e.g. lsblk…
For uti-linux version v2.34 (next spring) I'm working on new lsblk. The goal is keep all devices as data structs in memory to have ability to modify or reorder the tree. Now lsblk blindly follows slaves/holders links in /sys and in case of RAIDs or multi-path devices the output contains duplicate lines. The new version will provide de-duplication (lsblk --dedup WWN) to completely remove…
This release (rc1 now) is without dramatic changes and game-changing improvements. We have again invested our time and love to make cal(1) more usable. The most visible change is possibility to specify calendar system. The current (backwardly compatible) default is to use Gregorian calendar and Julian calendar for dates before September 1752 (British Empire calendar reform). Unfortunately, this…
uuidparse -- this is a new small command to get more information about UUIDs "hash". The command provides info about UUID type, variant and time. For example: $ (uuidgen; uuidgen -t) | uuidparse UUID VARIANT TYPE TIME 8f251893-d33a-40f7-9bb3-36988ec77527 DCE random 66509634-b404-11e7-aa8e-7824af891670 DCE time-based 2017-10-18 15:01:04,751570+0200 The command su has been refactored and extended to…
The command tailf is dead thing. (RIP ... years ago I had nice time to improve it with inotify:) You have to use "tail -f" from coreutils project. blkzone -- this new command is excellent example of the open source collaboration. The command has been developed by people from WD, Seagate and SanDisk (thanks to Shaun Tancheff, Damien Le Moal and others). The goal is to have command line interface to…
I can't believe that it's already 10 years we have active community around basic Linux utils. Yes, we had util-linux before (and many thanks to Adrian Bunk and Andries E. Brouwer ), but I believe that with git and close collaboration between Linux distributions and Linux kernel community it better now :-) ~11000 commits ~460 unique contributors ~630 regression tests ~100 utils, 5 shared libs with…
The release v2.29 (now rc1) is without dramatical changes, the small exception is libsmartcols where we have many improvements. The old good cal(1) is more user-friendly now. It's possible to specify month by name (e.g. "cal January 2017") and use relative placeholders, for example: cal now cal '1 year ago' cal '+2 months' fdisk(8) allows to wipe newly created partitions -- the feature is possible…
The release v2.28 does not contain any dramatical changes and huge improvements. It's another release to keep users happy and absorb new features provided by kernel. We all love this kind of release, right? :-) The fdisk programs ( sfdisk , cfdisk and fdisk ) have been improved to wipe old filesystem, RAID and partition tables from the device before libfdisk writes a new partition table. The…
The namespaces are commonly used way how to isolate global (ipc, mount, net, ...) resource instances. Unfortunately, we have no command line tool to list namespaces. The new command lsns(8) tries to fill this gap. Examples: # lsns NS TYPE NPROCS PID USER COMMAND 4026531836 pid 276 1 root /usr/lib/systemd/systemd --system --deserialize 15 4026531837 user 276 1 root /usr/lib/systemd/systemd --system…
logger is small util to send log messages from command line. It supports (relatively) a new systemd journal as well as classic syslog. The syslog is still de-facto standard for enterprise admins and the latest logger version add support for RFC5424. This RFC introduces "structured-data" and since v2.28 logger is going to support this feature too. The structured data is parse-able part of the…
I have worked on new features for sfdisk during v2.27 stabilisation. The most user visible change is partitions resize/move improvements. Now (in git tree) sfdisk is able to move partition together with data on the partition. Let's imagine you have disk with three partitions: Device Start End Sectors Size Type /dev/sdc1 2048 206847 204800 100M Linux filesystem /dev/sdc2 206848 1230847 1024000 500M…
Although it seems that System V IPC is obsolete thing, it's still used by many (enterprise) tools like databases, application servers etc. The classic tool ipcs(1) provides basic overview, unfortunately the output is very fixed and it's impossible to mix the output columns (for example --pid and --creator cannot be used together etc.). It's also very difficult to extend the current implementation…
As promised by the previous blog I have merged support for JSON dump to sfdisk/libfdisk. # sfdisk --json /dev/sda { "partitiontable": { "label": "gpt", "id": "E471810B-5954-48E6-B4F0-5D369ADCC514", "device": "/dev/sda", "unit": "sectors", "firstlba": 34, "lastlba": 468862094, "partitions": [ {"node": "/dev/sda1", "start": 2048, "size": 409600, "type": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B",…
I have merged into libsmartcols support for JSON format. The feature is currently enabled for lsblk(8), findmnt(8), lslocks(8) and losetup(8). The library already uses structured data, so add a different output format is pretty trivial. For example findmnt(8) and lsblk(8) are able to gather much information and standardized parsable format makes it easy to use it monitoring tools, automatic bug…
The last week released util-linux v2.26.2 contains improved (fixed:-) sfdisk. The most visible change is that the new version supports partition resize and start offset move. For example 1GiB disk with GPT: echo ", +10M" | ./sfdisk -N 1 /dev/sdc ... Old situation: Device Start End Sectors Size Type /dev/sdc1 2048 206847 204800 100M Linux filesystem New situation: Device Start End Sectors Size Type…
Today I merged support for persistent namespaces to unshare(1) . The persistent namespace does not require any running process with in the namespace and it's possible to enter the namespace by nsenter(1) . For example let's create a new UTS namespace and set a different hostname within the namespace: # hostname ws # touch /root/ns-uts # unshare --uts=/root/ns-uts # hostname FooBar # exit Now there…
I have merged a new cfdisk(8) improvement. It allows to display/hide additional information about the current (selected) partition: filesystem type, LABEL, UUID The important detail is that libblkid gathers the info by seeking on whole-disk device according to partition offsets from partition table -- so /dev/sda[n] devices do not have to exist or you can use cfdisk for disk images (e.g. "cfdisk…
Yesterday I merged support for sfdisk scripts to fdisk and cfdisk. Now it's possible to save your partitioning layout to text files and (re)use it in all fdisks. It means that you don't have to start your partitioning from scratch in programs like cfdisk or fdisk, but you can reuse and finalize partitioning scenario already defined by sfdisk scripts. It may be attractive for DIY system installers,…
The last partitioning tool from util-linux package without support for GPT (BSD, SGI, ...) and 4K disks was sfdisk. The situation was exactly the same like with cfdisk, it was impossible to incrementally improve the code, so the new version is written from scratch and based on libfdisk. The most visible change is that the new sfdisk is all about sectors, it does not support obsolete…
I merged zramctl tool a few days ago. It's based on original code from Timofey Titovets and the idea is the same as for losetup(8) . zRam was merged to Linux kernel 3.14; the zram devices use RAM to create compressed block devices. The zramctl provides user friendly command line interface to create, reset and list the devices. It's pretty simple and easy to use from userspace. See example below…
cfdisk is a popular ncurses partitioning tool. Unfortunately, it has been ignored by developers for many many years. The original version does not a have clue about 4K disks, modern disk I/O limits (alignment offset, optimal I/O sizes, etc), and it was all about MBR (DOS) only. It was impossible to improve the old code by refactoring, so the new version is written from scratch. The new cfdisk is…
util-linux 2.25 is going to contain libsmartcols . The library code is based on code originally developed for lsblk(8), findmnt(8), lslocks(8) etc. The goal is to share formatting code to print pretty tables and trees. Features: tree-like output (see lsblk(8) or findmnt(8)) table-like output (see lslocks(8)) formatting sensitive to terminal width fully supports UTF8 (correctly truncate data in…
I have already talked about it at g+ . For util-linux we don't want to follow the current strange behavior when command-line utils have disabled colors by default, but distributions use shell aliases in profile files to revert the default. It does not mean that we want ignore color blind people, obscure terminals or people who just don't like colors. The solution is to provide simple, elegant and…