The Linux man (or manual) pages are a fantastic resource. They contain detailed usage for commands, including all of their options and usages. The problem with man pages is that they may offer too much information. What if you're already familiar with a command and just trying to remember which option you need to complete a specific task?
That's where tldr comes in handy. This tool's name comes from the acronym (or initialism) TL;DR, which stands for too long; didn't read. It's internet slang for a summary of a long text. In the same spirit, the tldr command-line tool summarizes a lengthy man page and consists mainly of examples.
What is the tldr command?
The tldr command-line tool is a client for the community tldr pages project. Instead of searching through pages and pages of information until you find the option you're looking for and perhaps reading how to use it, type tldr {command} to get a short list of the most common uses for that command. Chances are, you'll get what you need.
For example, the man page for the find command consists of over 1,100 lines. The tldr for find has just 30 lines, including eight practical examples:
$ tldr find
find
Find files or directories under the given directory tree, recursively.
More information: https://manned.org/find.
- Find files by extension:
find root_path -name '*.ext'
- Find files matching multiple path/name patterns:
find root_path -path '**/path/**/*.ext' -or -name '*pattern*'
- Find directories matching a given name, in case-insensitive mode:
find root_path -type d -iname '*lib*'
- Find files matching a given pattern, excluding specific paths:
find root_path -name '*.py' -not -path '*/site-packages/*'
- Find files matching a given size range:
find root_path -size +500k -size -10M
- Run a command for each file (use `{}` within the command to access the filename):
find root_path -name '*.ext' -exec wc -l {} \;
- Find files modified in the last 7 days and delete them:
find root_path -daystart -mtime -7 -delete
- Find empty (0 byte) files and delete them:
find root_path -type f -empty -delete
This tool is not a replacement for the man command. The man pages are still the canonical and complete source of information for a Linux command. tldr is a nice complement that provides, at a glance, focused details to help you to get something done quickly.
Install tldr
The tldr project provides two versions of the client: Node.js and Python. Fedora Linux packages the Python client in the official repository, so you can install it using dnf:
$ sudo dnf -y install tldr
Install it on other Linux distributions using npm or pip3. For more information, consult the project repository.
[ Download now: Linux commands cheat sheet. ]
Use tldr offline
The tldr tool typically requires internet access to consult the tldr pages. The Python client available in Fedora supports downloading and caching these pages for offline access. To do this, run tldr with the -u option:
$ tldr -u
Updated cache for 3239 entries
Now you can use tldr when you're disconnected from the internet.
[ Get the guide to installing applications on Linux. ]
What's next?
The tldr pages are a community effort. Not all commands are available, but more commands are added regularly. You can help improve the existing examples or add missing commands to the project. For more information, consult the project's contribution guidelines.
For more information about tldr, you can always use tldr tldr.
Über den Autor
Ricardo Gerardi is a Principal Consultant at Red Hat, having transitioned from his previous role as a Technical Community Advocate for Enable Sysadmin. He's been at Red Hat since 2018, specializing in IT automation using Ansible and OpenShift.
With over 25 years of industry experience and 20+ years as a Linux and open source enthusiast and contributor, Ricardo is passionate about technology. He is particularly interested in hacking with the Go programming language and is the author of Powerful Command-Line Applications in Go and Automate Your Home Using Go. Ricardo also writes regularly for Red Hat and other blogs, covering topics like Linux, Vim, Ansible, Containers, Kubernetes, and command-line applications.
Outside of work, Ricardo enjoys spending time with his daughters, reading science fiction books, and playing video games.
Ähnliche Einträge
Why should your organization standardize on Red Hat Enterprise Linux today?
RPM and DNF features and enhancements in Red Hat Enterprise Linux 10.1
The Overlooked Operating System | Compiler: Stack/Unstuck
Linux, Shadowman, And Open Source Spirit | Compiler
Nach Thema durchsuchen
Automatisierung
Das Neueste zum Thema IT-Automatisierung für Technologien, Teams und Umgebungen
Künstliche Intelligenz
Erfahren Sie das Neueste von den Plattformen, die es Kunden ermöglichen, KI-Workloads beliebig auszuführen
Open Hybrid Cloud
Erfahren Sie, wie wir eine flexiblere Zukunft mit Hybrid Clouds schaffen.
Sicherheit
Erfahren Sie, wie wir Risiken in verschiedenen Umgebungen und Technologien reduzieren
Edge Computing
Erfahren Sie das Neueste von den Plattformen, die die Operations am Edge vereinfachen
Infrastruktur
Erfahren Sie das Neueste von der weltweit führenden Linux-Plattform für Unternehmen
Anwendungen
Entdecken Sie unsere Lösungen für komplexe Herausforderungen bei Anwendungen
Virtualisierung
Erfahren Sie das Neueste über die Virtualisierung von Workloads in Cloud- oder On-Premise-Umgebungen