21

I want to provide URL links to man page content at apple.com as an authoritative source of information. Describing and quoting the local man page is awkward.

Does Apple provide man pages on the web?

3
  • Each release of OS X already contains local copies of manual pages for command line programs, so there is no need to point elsewhere and why Apple no longer maintains a set of pages for each release at their web site. – user3439894 May 25 '16 at 1:35
  • 7
    It's useful to have them on a website for linking to programmers who use other operating systems. Also a company the size of Apple could have them up on their site with basically no effort. – Lassi Apr 30 '19 at 17:43
  • I need these all the time. Sometimes I'm trying to write shell scripts that will support both Linux and macOS (just for example, whether readlink is available on Mac, or how to get the file size in bytes from stat). Sure, I could go look up the BSD manual pages but c'mon, Apple. – TheDudeAbides Nov 9 '19 at 2:10
7

The old online index seems have to vanished. You can however find the source code of manual pages on https://opensource.apple.com/. This site hosts historical versions as well.

For example:

Unfortunately there is no overview of all manual pages, so you have to manually check directory indexes or use something like site:opensource.apple.com/source "ls.1" in DuckDuckGo or Google.

1
  • The site:opensource.apple.com/source trick is brilliant. For a browseable list of all manual pages from all sections of the manual (albeit dating back to the OS X 10.9 days) see my answer below. – TheDudeAbides Nov 9 '19 at 1:56
4

Hello from the future world of 2019!

Sadly, it seems a web search for site:opensource.apple.com/source stat.1 is still the fundamental state of things, if you want "official" documentation from apple.com.

Here are some alternatives:

  • SS64.com under the "macOS" section, as mentioned in benwiggy's answer below.
    • a great resource for Windows scripting languages, too, if you are of that persuasion
    • maybe buy the site's maintainer, Simon, a beer (scroll to the bottom for the PayPal link) if you like it, because he's been serving this up ad-free and answering posts in the forums for literally decades
  • Mojave (10.14) man pages on unix.com
    • the site design here uses an excruciating amount of whitespace, and you'll probably need to zoom out to see the man pages in their entirety
  • Darwin man pages on the Wayback Machine
    • this is a May 2018 capture, for OS X 10.9 (Mavericks), and there are still some holes, so you may need to go back farther in time with the Wayback Machine to get some of the pages

Update: By the way, you can format the raw roff source of the man pages on opensource.apple.com into something human readable like this:

  1. copy the "plain text" URL:

    enter image description here

  2. fetch that URL with curl and format it for viewing on-screen with groff:

    # use 'wget -qO -' if you don't have 'curl'
    curl -s https://opensource.apple.com/source/grep/grep-28/grep/doc/grep.1 \
      | groff -man -T utf8 \
      | less
    

Some side notes about that groff command:

  • add -rLL=${COLUMNS}n to use the full width of your terminal, if 80 columns doesn't do it for you; the man command usually does some magic to autodetect this from your terminal size (reference)
  • you can substitute groff -man -T ps > ~/Desktop/grep.1.ps for that last part to get a beautiful PostScript manual page that you can open and print with Preview.app, if that's your thing
2
  • basically "Hello from the future world" is correct for every given answer there is. – bot47 Nov 9 '19 at 9:09
  • If the future world actually fixed your problem, and bothered to report back. But sometimes the future world just locks your thread instead, with no resolution for anybody. :/ – TheDudeAbides Nov 14 '19 at 16:08
4

In the past, Apple provided these pages online, for example: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/ls.1.html for the ls command.

Source: Dr Drang

Now you would need to find them mirrored elsewhere or use https://archive.org

0
2

There are some MacOS man pages here, though I don't know how complete the list is.

1
  • SS64 is a really good resource for anyone who works in a command-line environment, on any OS. It's well-structured, comprehensive, and uncluttered. If only Microsoft's (or Apple's) official documentation were up to this standard. – TheDudeAbides Nov 14 '19 at 16:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .