Quick Facts
- Category: Networking
- Published: 2026-05-04 10:42:14
- Beyond Freezer Ice: The Discovery of Water's Most Complex Crystalline Forms
- 10 Key Insights into the Q4 2025 Threat Landscape for Industrial Automation Systems
- Automating Large-Scale Dataset Migrations with Background Coding Agents
- The Hidden Origins of Australia's Twelve Apostles: A Q&A on Their Rise from the Sea
- Understanding and Tracking Earth's Ring Current: A Guide to the STORIE Mission
Introduction
Man pages often get a bad rap—they can be dense, outdated, and hard to navigate. But what if they could be as useful as a great blog post, with the added bonus of being accurate? Recently, I focused on enhancing the man pages for two powerful yet underutilized tools: dig and tcpdump. By adding clear, beginner-friendly examples, I aimed to bridge the gap between raw documentation and practical use. Here are ten key lessons from that experience, including why examples matter, how I overcame technical hurdles, and what I learned from maintainers. Whether you're a frequent user or a newcomer, these insights can help you get more out of man pages—and maybe even improve them yourself.
1. The Power of Basic Examples
The core goal was to provide the most fundamental examples for people who use tcpdump or dig infrequently—or not at all. Instead of assuming advanced knowledge, I focused on common use cases: a simple DNS lookup with dig or capturing packets on an interface with tcpdump. These examples serve as a quick refresher for occasional users and a gentle entry point for beginners. Feedback from the community confirmed that this approach resonates: users appreciate examples that don't require deciphering arcane flags or reading between the lines. As a result, the updated man pages now include annotated, real-world commands that anyone can copy and adapt.
2. Accuracy Through Collaboration
One surprising benefit of working on man pages is their potential for near-perfect accuracy. Unlike blog posts or Stack Overflow answers, man pages can be reviewed and corrected by tool maintainers—experts who know every nuance. During this project, I submitted changes to the dig and tcpdump man pages and received detailed feedback from Denis Ovsienko, Guy Harris, Ondřej Surý, and others. Their reviews caught inaccuracies I hadn't considered and validated the examples against the actual behavior of the tools. This collaborative process ensures that the documentation is not just readable, but also trustworthy—a rare combination in the fast-moving world of open source.
3. Discovering Hidden Features
Even simple questions—like “What are the most commonly used tcpdump flags?”—can lead to discoveries. While adding examples, I learned that when saving packets to a file with tcpdump -w out.pcap, adding the -v flag prints a live summary of captured packets. This feature is incredibly useful for monitoring progress without leaving the terminal, but I never would have spotted it on my own. It highlights how maintainers often know about helpful but underdocumented features. By engaging with them during the writing process, I uncovered practical tips that made the examples more valuable for everyone.
4. Avoiding the Roff Language
The tcpdump man page is written in the roff language, a formatting system that predates modern markup and is notoriously difficult to use. I had no desire to learn it, so I wrote a minimal Markdown-to-Roff script that converted my examples into the required format. The script used conventions already present in the man page, ensuring consistency. While tools like pandoc could do the conversion, their output often looked different from the original style. By crafting a custom converter, I kept the formatting simple and clean without sacrificing compatibility. This approach saved time and reduced frustration, proving that you don't need to master roff to contribute.
5. A Markdown-to-Roff Workflow
The script I created was intentionally basic: it read Markdown text and generated roff commands for headings, paragraphs, and code blocks. For example, a line starting with # became a .SH heading, and backtick-enclosed code turned into .B or .I formatting. I didn't try to handle complex tables or nested lists—the man page had no need for them. This pragmatic approach let me focus on content rather than syntax. The script is now available on GitHub for anyone who wants to adapt it for their own man-page projects. It's a testament to how small, custom tools can make big differences in documentation quality.
6. The Value of a Beginner's Mindset
Writing examples for beginners forced me to think like one. I had to ask: what would someone who has never used dig or tcpdump need to see? This led to examples that show the full command, the expected output, and a brief explanation of what each part does. For instance, dig example.com shows the default server and query results, while tcpdump -i eth0 captures live traffic on a specific interface. By stripping away unnecessary complexity, the examples become immediately useful. Maintainers appreciated this focus, as it aligned with what users actually requested: clear, copy-pasteable commands that work out of the box.
7. Positive Feedback from Maintainers
One unexpected outcome was the enthusiasm from project maintainers. They saw the value in improved documentation, especially for tools that are widely used but often misunderstood. The review process was professional and encouraging—Guy Harris pointed out subtle edge cases, Ondřej Surý provided cross-platform compatibility tips, and Denis Ovsienko helped refine the formatting. This positive experience motivated me to continue working on man pages. It also reinforced that maintainers are not just gatekeepers; they are partners in making documentation better for everyone.
8. Lessons from the Django Documentation
During the project, I drew inspiration from the Django documentation, which is renowned for its clarity and thoroughness. Django's docs include plenty of examples, step-by-step tutorials, and a consistent voice that makes complex topics approachable. I realized that man pages could adopt similar principles: use plain language, avoid jargon, and include concrete examples. While the format constraints of man pages limit some features (like interactive code blocks), the core idea holds. If more tool documentation followed Django's model, users would have less need to search for third-party resources.
9. Overcoming the “Documentation is Hard” Mindset
I've often assumed documentation would be difficult to read, so I skipped it in favor of blog posts or asking friends. This project changed my perspective. By taking the time to improve the man pages, I saw that they can be just as engaging as any tutorial. The key is to treat documentation as a first-class product—not an afterthought. My optimism grew when I saw how easily users could grasp concepts through well-placed examples. The lesson for me was: don't expect documentation to be bad; expect it to be good, and then help make it so.
10. A Template for Future Contributions
This experience gave me a reusable process for improving man pages elsewhere: identify tools that lack examples, propose changes to maintainers, write in Markdown, and convert using a custom script. The feedback loop was surprisingly fast—many maintainers review documentation within days. I've already started applying this to other tools (like curl and jq). The technique is straightforward: focus on a small set of common use cases, explain what each command does, and include sample output. With these steps, anyone can turn a stale man page into a valuable resource for the community.
Conclusion
Improving man pages is not just an act of technical writing—it's a gift to every future user of the tool. By adding real-world examples to dig and tcpdump, I learned that documentation can be accurate, approachable, and even enjoyable. The collaboration with maintainers taught me new tricks, and the script I built simplified the formatting hurdles. If you've ever felt intimidated by man pages, remember: you can help make them better. Start with a simple example, share it with the project community, and watch your contribution make a difference. With a little effort, man pages can become the friendly resource they were always meant to be.