13

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?

  • 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
  • 4
    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 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 at 2:10
4

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.

  • 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 at 1:56
3

Yes, Apple provides 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

  • 7
    That link contains the word “legacy”, and addresses old version of Mac OS X. I could not find up-to-date editions of that site. – Basil Bourque May 25 '16 at 1:07
  • 3
    I don't know what might be out of date -- that's the issue. The pages clearly say in large font at the top This manual page is for Mac OS X version 10.9. The very top bar on the page says “Retired Documents Library”. And “legacy” in the IT industry definitely is a euphemism for "out-dated, no longer recommended or applicable". So while this site may be better than nothing, it is certainly not good for current discussions. I do appreciate your posting, I just wish there were up-to-date and specific-version editions of the man pages on the web. – Basil Bourque May 25 '16 at 2:54
  • 9
    @samh Hi, this URL is dead now – SebMa Jun 29 '18 at 9:52
  • 10
    It appears Apple took down that section of their site... any new locations? – 0xF2 Jul 14 '18 at 22:27
  • 1
    @0xF2 You can access old versions on archive.org, but Apple stopped updating them around OS X 10.9. – Zenexer Jan 7 at 9:14
2

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:

  • 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
  • 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

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
  • basically "Hello from the future world" is correct for every given answer there is. – Max Ried Nov 9 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 at 16:08
1

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

  • 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 at 16:22

You must log in to answer this question.

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