Logo with initials

Nifty command lines: tldr

──── 2 mins
Last Updated: 4 November 2021

This post is part of the Nifty Command Lines series.

There are a few reasons that computer terminals scare people (myself included):

  • Movie stereotypes of green terminals used by hoodie-wearing hackers in basements.
  • How terminals try to “help” you.

If you ask me, the default help pages for commands (called man pages for manual, go figure) aren’t designed for humans. They make no sense and are impossible to browse.

tldr pages try to fix that. The tldr utility gives you a people-friendly list of examples to help you with a command.

Example with the rename command that we discussed in a previous article:

Console output of tldr pages with the rename command

Compare that with the man page, as follows:

RENAME(1)                        User Contributed Perl Documentation

NAME
       rename - renames multiple files

VERSION
       version 1.600

SYNOPSIS
       rename [switches|transforms] [files]

       Switches:

       -0/--null (when reading from STDIN)
       -f/--force or -i/--interactive (proceed or prompt when overwriting)
       -g/--glob (expand "*" etc. in filenames, useful in WindowsX CMD.EXE)
       -k/--backwards/--reverse-order
       -l/--symlink or -L/--hardlink
       -M/--use=Module
       -n/--just-print/--dry-run
       -N/--counter-format
       -p/--mkpath/--make-dirs
       --stdin/--no-stdin

See how neat this is with ffmpeg, a tool that’s notoriously unfriendly.

FFMPEG Console output

Also, as opposed to man pages, which require you to install a vim-like interface, tldr pages are easier to contribute to. Everything is in a GitHub repository.

Finally, tldr isn’t limited to the command line. There’s also a VSCode Extension, an Alfred Workflow and even an iOS app.

If you’re convinced, install it with brew install tldr on macOS and Linux.

That’s the end of the series! It introduced you to a few, well, nifty tools that I use quite often, and I hope that it will help you reach out to the terminal to save time.

Thanks!

290 words

Share