moreutils
Enhance standard Unix tools with useful utilities
TLDR
View documentation for pages related to standard streams
View documentation for other pages
SYNOPSIS
moreutils is a software package, not a single command with its own synopsis. It provides a suite of individual commands. Each command within the moreutils package has its own specific syntax and usage.
Examples of command usage from moreutils:
ts [-r] [-i] [-s] [-z] [format]
vipe [command...]
vidir [directory...]
PARAMETERS
Note:
moreutils itself is a package and does not accept command-line parameters. Instead, it provides a set of individual commands, each with its own parameters and options. Below are some of the notable commands included in the moreutils package:
ts
Prefixes standard input with timestamps. Useful for logging and analyzing output.
vipe
Allows you to edit a pipe. Input to a command is sent to an editor, and the editor's output is then sent to the original command.
vidir
Edits a directory as text. Files and directories can be renamed, deleted, or created by editing a list in your $EDITOR.
ifne
Executes a command only if the standard input is not empty, useful in scripting conditional actions.
isutf8
Checks if standard input or a file is UTF-8 encoded.
sponge
Sucks up all standard input before writing it to a file. Useful for overwriting a file with the output of a command that reads from that same file (e.g., grep ... file | sponge file).
pee
Tees standard input to multiple pipes. Like tee but for pipes, allowing simultaneous processing by multiple commands.
combine
Combines two files based on common fields, similar to join but more flexible.
mispipe
Pipes two commands together but allows the exit status of the first command to be preserved, unlike standard piping.
zrun
Automatically decompresses files and runs a command on the decompressed content, handling various compression formats transparently.
DESCRIPTION
moreutils is a package containing a collection of small, focused, and incredibly useful Unix utilities that often fill gaps left by standard tools or provide more efficient ways to accomplish common tasks. These utilities are designed to be simple, standalone, and easily scriptable, adhering to the Unix philosophy of doing one thing well. They enhance productivity by providing tools for tasks like editing pipes, managing directories as text, timestamping output, or conditionally executing commands. It's an essential toolkit for any command-line user or script developer looking for pragmatic enhancements to their workflow.
CAVEATS
Since moreutils is a collection, understanding its full utility requires familiarity with each individual command it provides. Some commands might have slight overlaps in functionality with existing utilities, but typically offer a more streamlined or specific solution. The parallel command in moreutils is distinct from GNU parallel, which is a much more comprehensive job runner for parallel execution.
INSTALLATION
moreutils is available in the package repositories of most Linux distributions and macOS via Homebrew.
To install on Debian/Ubuntu: sudo apt-get install moreutils
To install on Fedora/RHEL/CentOS: sudo dnf install moreutils (or yum for older versions)
To install on Arch Linux: sudo pacman -S moreutils
To install on macOS with Homebrew: brew install moreutils
HISTORY
The moreutils package was created by Joey Hess, a prominent Debian developer, to address common needs and simplify scripting tasks that often required complex combinations of standard utilities. It started as a collection of small, personal scripts and grew into a widely adopted package due to the practical usefulness and adherence to the Unix philosophy of its tools. The development focuses on creating robust, efficient, and highly scriptable commands that seamlessly integrate into the Unix environment.