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.
Sobre o 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.
Mais como este
Behind the scenes of RHEL 10, part 3
Alliander modernises its electricity grid with Red Hat for long-term reliability in balance with rapid innovation
The Overlooked Operating System | Compiler: Stack/Unstuck
Linux, Shadowman, And Open Source Spirit | Compiler
Navegue por canal
Automação
Últimas novidades em automação de TI para empresas de tecnologia, equipes e ambientes
Inteligência artificial
Descubra as atualizações nas plataformas que proporcionam aos clientes executar suas cargas de trabalho de IA em qualquer ambiente
Nuvem híbrida aberta
Veja como construímos um futuro mais flexível com a nuvem híbrida
Segurança
Veja as últimas novidades sobre como reduzimos riscos em ambientes e tecnologias
Edge computing
Saiba quais são as atualizações nas plataformas que simplificam as operações na borda
Infraestrutura
Saiba o que há de mais recente na plataforma Linux empresarial líder mundial
Aplicações
Conheça nossas soluções desenvolvidas para ajudar você a superar os desafios mais complexos de aplicações
Virtualização
O futuro da virtualização empresarial para suas cargas de trabalho on-premise ou na nuvem