joey/ code/ moreutils

moreutils is a growing collection of the unix tools that nobody thought to write thirty years ago.

It began when I blogged:

I'm a fan of the unix tools philosophy, but I sometimes wonder if there's much room for new tools to be added to that toolbox. I've always wanted to come up with my own general-purpose new unix tool.

Well, after lots of feedback documented in the many followups (1 2 3) in my blog, I've concluded:

Maybe the problem isn't that no-one is writing them, or that the unix toolspace is covered except for specialised tools, but that the most basic tools fall through the cracks and are never noticed by people who could benefit from them.

And so the moreutils collection was born, to stop these programs from falling through the cracks.

Probably the most general purpose tool in moreutils so far is sponge(1), which lets you do things like this:

% sed "s/root/toor/" /etc/passwd | grep -v joey | sponge /etc/passwd

There are lots more listed in the README, and I'm always interested to add more to the collection, as long as they're suitably general-purpose, and don't duplicate other well-known tools.

Should moreutils have a mailing list? Mail me if you'd like to be on such a list. For now, you can subscribe to the news RSS feed below.

Download

A Debian package as well as the source tarball for moreutils can be downloaded from packages.debian.org, or using apt.

The git repository can be cloned from git://git.kitenet.net/moreutils

News

version 0.30

moreutils 0.30 released with these changes

  • debhelper v7; rules file minimisation
  • Use DESTDIR instead of PREFIX.
  • Add a DOCBOOK2XMAN setting. (Greg KH)
  • ifne: Add -n which makes it run the command if stdin is empty.
  • ifne: If no command is specified, print usage information.
Posted Wednesday evening, May 14th, 2008
version 0.29

moreutils 0.29 released with these changes

  • Add ifne, contributed by Javier Merino.
  • sponge, ifne: Ensure that suspending/resuming doesn't result in partial writes of the data, by using fwrite() rather than write().
  • sponge: Handle large data sizes by using a temp file rather than by consuming arbitrary amounts of memory. Patch by Brock Noland.
  • ts: Allow both -r and a format to be specified, to parse dates and output in a specified format.
  • ts: Fix bug in timezone regexp.
Posted Tuesday afternoon, April 15th, 2008
version 0.28

moreutils 0.28 released with these changes

  • Moved to a git repository.
  • vidir: Applied patch from Stefan Fritsch (one part of #412176):
    • Check for control characters (especially newlines) in filenames and error out, since this can greatly confuse the editor or vidir.
    • If the source of a rename does not exist (and thus the rename will fail anyway), vidir should not move an existing target file to a tmpfile.
    • If a directory is renamed, vidir should take that into account when renaming files in this directory.
    • If a directory name is passed as name/ to vidir, vidir should not add second slash after the name.
  • vidir: Add support for unlinking directories. To recursivly delete a directory and its contents, pipe find to vidir, and delete the directory and its contents in the editor. Closes: #412176
  • Add example to man page about recursive modification of directories. Closes: #390099
Posted late Saturday afternoon, February 2nd, 2008

TODO

Tools under consideration

Here are some that are under consideration but have not yet been included. Feel free to suggest others. I also welcome feedback on which of these to include.

Rejected tools

(Some of these rejections may be reconsidered later.)