TopRatedTech

Tech News, Gadget Reviews, and Product Analysis for Affiliate Marketing

TopRatedTech

Tech News, Gadget Reviews, and Product Analysis for Affiliate Marketing

I Explored the Biggest Man Pages on Linux, Here’s What I Learned

I just lately discovered myself questioning how massive varied man pages are. Some are so lengthy, they appear impenetrable, whereas others have little or no element in any respect. What can their measurement inform us in regards to the Linux or macOS system they’re on?

How Do You Discover the Largest Man Pages?

The command line I used to seek out the largest man pages appears to be like like this:

        du -a /usr/share/man | fgrep '.' | type -rn | head -n 20

A good bit is occurring there, so let me clarify.

Default man pages stay in a hierarchy rooted at /usr/share/man. Inside that listing are sub-directories for every man part. Inside these are particular person man web page recordsdata like /usr/share/man/man1/grep.1 and /usr/share/man/man4/ip.4.

Man web page recordsdata can stay in a number of areas; the manpath command lists them. I’m after probably the most “inventory” expertise right here, so I’m proscribing my search to /usr/share/man, the place the majority of inventory instructions stay.

The du command, for “disk utilization,” exhibits you how much disk space files and directories are taking up. The -a possibility lists all recordsdata and directories within the hierarchy, with their block measurement alongside them. Block measurement isn’t fairly the identical as file measurement, however for this train, it’s shut sufficient.

The pipe to fgrep removes the directories that du reviews. Once more, you are able to do this in higher methods, however within the particular case right here, it really works advantageous.

The pipeline then makes use of type with the -r and -n choices to type the output from du numerically with the biggest numbers on the prime. This works as a result of du’s output consists of the dimensions as its first discipline.

Lastly, head -n 20 offers the highest 20 recordsdata. You would differ the quantity or exchange the entire command with a pager like much less to discover the total output.

What Are the Largest Man Pages?

I checked two moderately vanilla, Unix-like working techniques to see what their greatest man pages have been:

On macOS, I noticed the next:

A list of man page files including perltoc.1, perlapi.1, perlfunc.1, and bash.1.

So the largest man pages are perltoc, perlapi, perlfunc, postconf, and perldiag. A number of Perl!

On Ubuntu, the outcomes are very completely different:

A list of man page files including bash.1.gz, openvpn.8.gz, git-config.1.gz, and proc.5.gz.

Discover how Ubuntu gzips its man pages. Textual content recordsdata usually compress extremely effectively, so that they take up lots much less house. However the greatest pages are much less Perl-focused and embody networking and sysadmin utilities.

Associated


How to Zip and Unzip Files With Gzip on Linux

Save information space for storing and shorten transmission occasions with gzip on Linux.

What the Largest Man Pages Can Train Us

You may study lots by studying them, however these pages additionally inform us some helpful issues about Linux, macOS, and which applications are probably the most heavyweight.

Perl Is Comprehensively Documented

On macOS, 4 of the 5 greatest man pages are Perl-related. I checked to see what number of Perl man pages there have been in complete:

        discover /usr/share/man -name 'perl*'

214! Virtually one-third of those are “delta” pages, just like the one you get from man perl583delta:

The man page for perl583delta shows sections with titles like Incompatible Changes and Core Enhancements.

These pages are the equal of launch notes, and they’re current for a lot of minor variations of the language. This was one of many first issues I discovered by the method: some man pages don’t map on to a command or put in program.

In distinction, there are simply six perl* man pages on my Ubuntu machine. This is not actually in regards to the model of Perl that’s put in, both. On macOS, I see model 5.34.1 and on Ubuntu it’s 5.34.0.

zsh Is So Huge, it Splits its Man Pages Into A number of Smaller Ones

On macOS, I run zsh, and it seems that this shell is well-represented in relation to man pages. Inside the highest 10 is a person web page named “zshcompsys,” and the highest 20 additionally consists of zshcontrib, and zshmodules. Like Perl, zsh breaks its handbook into separate pages; “solely” 16 of them, although.

The zshcompsys web page is a whopping 5,000 traces explaining how zsh’s tab-complete works. The completion system is extremely highly effective and configurable, so it’s comprehensible that this man web page is so giant.

Associated


What is ZSH, and Why Should You Use It Instead of Bash?

Properly, it has extra colours.

This contrasts with different shells. The primary bash man web page continues to be massive: #8 on the record and slightly below 5,000 pages. However there’s just one different bash-related handbook web page, bashbug, and it’s tiny, though it does doc an fascinating command that allows you to file a bug report from the command line.

Different shells are well-represented—tcsh is at #9 within the record, and ksh at #20—however every of these shells restricts itself to only a single man web page.

In the meantime, on Linux, I take advantage of bash and this shell has the largest man web page general. This checks out; I don’t have zsh put in and I might count on shell man pages to be among the many greatest.

curl Is the Most Advanced “Regular” Program

This was the place my journey started, questioning if some other program was as difficult and well-documented as curl. The curl command has so many options, to cope with all of the completely different options of HTTP, that its man web page spans ~4,500 traces on Linux and ~6,500 on macOS. The distinction might be on account of completely different variations of curl (8.7.1 on macOS, 7.81.0 on Ubuntu), however both approach, it’s a mammoth handbook.

When man pages attain this measurement, they begin to grow to be unwieldy. In curl’s case, I believe there are two higher alternate options. First, there’s tldr, a simpler alternative to man that focuses on instance makes use of. Right here’s what it makes of curl:

The tldr page for curl shows a brief description, followed by usage examples.

These 32 traces are much more environment friendly than the 6,000 within the man web page! The tldr web page additionally mentions the second-best different: an online version of curl’s man page.

macOS Is Extra Centered on Part 1

man’s personal man web page describes part 1 because the “Common Instructions Guide.” On macOS, 18 of the biggest 20 man pages are in part 1. In distinction, Ubuntu’s greatest man pages are way more various, distributed throughout sections 1, 3 (Library Features), 5 (File Codecs), and eight (System Supervisor’s Guide).

The part 8 man web page for openvpn is the second greatest on my system. It even warns the reader about its personal size!

The man page for openvpn explains that it contains a lot of options because the tool is so flexible.

This in all probability displays the first customers of every system. macOS is geared toward a broader shopper market, so even its terminal man pages are geared in the direction of end-user instructions. Linux appeals to programmers, sysadmins, and community operators, so its lower-level man pages are extra complete.

Extra Than Something, I Realized to Be Curious Once more

What began as a throwaway query I requested myself, developed into an exploration of Unix rabbit holes I’d by no means ventured into earlier than. I knew the naked minimal about man pages, however my understanding of sections was restricted, and I didn’t know in regards to the manpath command in any respect. Extra importantly, I didn’t know a lot in regards to the composition of man pages on my techniques, and I definitely didn’t understand how a lot house they devoted to Perl or git-config.

This train made me nostalgic for my earlier days with Linux, when the whole lot was ripe for exploring. After years—even many years—of use, it’s straightforward to grow to be complacent and cease asking questions in regards to the underlying system. I’ve been reminded that peeking backstage could be an efficient approach of studying, and I’ll attempt to feed that inquisitive nature just a bit bit extra sooner or later.

Source link

I Explored the Biggest Man Pages on Linux, Here’s What I Learned

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top