Mac Os X Man Pages



  • The Missing Package Manager for macOS (or Linux). It’s all Git and Ruby underneath, so hack away with the knowledge that you can easily revert your modifications and merge upstream updates.
  • In those pre-OS X 10.4 days, this required exporting the contents of (and then processing) the man page to a temporary file, then opening that temporary file in Preview. With the release of Tiger.
  • Open a file or folder. The open command opens a file (or a folder or URL), just as if you had double-clicked the file's icon. Syntax open options -b bundleidentifier -a application file.-args arg1.Key -a application The application to use for opening the file -b bundleindentifier The bundle identifier for the application to use when opening the file.

MacOS Big Sur elevates the most advanced desktop operating system in the world to a new level of power and beauty. Experience Mac to the fullest with a refined new design. Enjoy the biggest Safari update ever. Discover new features for Maps and Messages. And get even more transparency around your privacy.

Yet another way to read beautifully formatted man pages | 21 comments | Create New Account
Click here to return to the 'Yet another way to read beautifully formatted man pages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Yet another way to read beautifully formatted man pages
This is nice, but it does assume that you are always connected to the net, and it does take a moment or two for the webpage to load.

Personally, I like to use the following. The output is in plain text rather than a pretty webpage, but it is instantaneous, requires no network connection, and gives you all the functions and convenience of TextEdit (or whatever other text editor you choose to use) while working with man pages.

Just add the following lines to .profile (or .bash_profile or whatever applies to your situation) in your home folder.

Yet another way to read beautifully formatted man pages

For those of who like to use vim:
vman()
{
man '${1}' | col -bx | view -
}

Yet another way to read beautifully formatted man pages

Actually, if you're using vim, put this into your .vimrc:

and then, from inside vim, you can type ':Man whatever' (yes, the M must be uppercase) to get nice syntax-colored (you do have syntax on in your .vimrc, right?) man pages in a split window inside vim. Great for referring to documentation while writing scripts.

Oh, and if you haven't checked out a recent version of MacVim, definitely give it a whirl -- it's awesome (best version of the best text editor ever, and it's free).

Yet another way to read beautifully formatted man pages

This is what I settled on using MacVim:
function tman {
man '${1}' | col -b | /usr/local/bin/gview - 1>/dev/null 2>&1
}

Yet another way to read beautifully formatted man pages

Thanks for your suggestion -- you're right about the speed, and of course yours works offine. I added that too and now I have both.

Yet another way to read beautifully formatted man pages

To support the non-numeric man sections, such as 'n' (for Tcl commands), change your regex to:
.*(${1}.)([[:alnum:]]).*$

Yet another way to read beautifully formatted man pages
Yet another way to read beautifully formatted man pages
An alternative is to put man.pl into the cgi-bin of a local server and add All 1 2 3 4 5 6 7 8 9 n to your local home page.
Yet another way to read beautifully formatted man pages

There are also some excellent man page reading apps out there, but they require launching and browsing a list.
Not necessarily. Using Bwana I can just type 'open man:gethostbyname' and instantly see the output in my web browser. It also has searching capabilities. If I'm already in the browser, I can just type 'man:gethostbyname' in the address field.
The only problem with Bwana I've found is that if you click on a man link from within Xcode documentation, it opens the man page in Xcode documentation, but also tries to open it in Bwana, but fails. It is annoying but not too big a deal since, while in X code documentation, I typically don't need to lookup man pages.

Mac
Yet another way to read beautifully formatted man pages

I like bwana too, because I use Firefox and search by typing. Very fast. From there you can print the PDF. It generates an index, which I've bookmarked.

Yet another way to read beautifully formatted man pages

I've always used the following, in this case for 'dscl', without the %:
% man -t dscl | pstopdf -i -o ~/Desktop/dscl.pdf

Yet another way to read beautifully formatted man pages

It should be noted that this hint does not display the man pages content stored on your hard drive, therefore it may not display the correct man page for the version of the app that is installed on your computer. For example, if you've installed a more recent version of rsync, this hint will load Apple's rsync man page which describes the behavior of the version of rsync included in Mac OS X, and that may have different options than the one you're running locally.

Yet another way to read beautifully formatted man pages
I use bwana and this it opens the man page in my browser
Yet another way to read beautifully formatted man pages

as pointed out in the comments on the PDF hint - the key to making this a great option is to cache the PDFs - they then open instantly after a one time conversion.
Will work when your offline - while this one won't
-P

Yet another way to read beautifully formatted man pages

Looks like I'm the only one still using good old 'man'. :)
Type '/word' to search for 'word', press N to go to the next hint and navigate with vim-like controls (F, B, J, K, g, G), that's all I need. :)
---
this is not the sig you`re looking for.

Yet another way to read beautifully formatted man pages
Pages

I use an AppleScript to accomplish this (using pstopdf -> Preview) but in addition to the lookup, for a quicker response next time, I store the results of each unique man page in a folder in ~/Documents. My script then checks that folder first for the term entered and does a man -t lookup of the term only if it's not already on file.

Yet another way to read beautifully formatted man pages
And if we need any more evidence that there is more than one way to do things, here's what I have in my .bashrc:
function niceman { man -t [email protected] | open -f -a Preview.app; }
This makes man output PostScript and Preview will convert it to a PDF. On large man pages it may take a few seconds, but on small ones it's nice and quick. All the formatting comes through looking very good.Mac Os X Man Pages
As an example, I timed 'niceman bash' from the time I hit enter to the time I saw the PDF open in Preview - it took around 5 seconds to generate a 64-page PDF.

---
k:.

Yet another way to read beautifully formatted man pages
Macos
Yet another way to read beautifully formatted man pages

My thoughts exactly. In the Terminal it's just 'manopen zsh' to open the corresponding formatted and linked man page. And you can leave it open while crafting your command-line.
Try it and see, if you don't like it then go back to the ugly Times-Roman uselessly-paginated non-hyperlinked PDF files.
---
Madness takes its toll.
Please have exact change.

The wealth of information on this forum is fantastic.

Yet another way to read beautifully formatted man pages
As has been commented, this won't work when not online, but it also wont work for non Apple hosted man pages, such as those from MacPorts or Fink or anything else. Combining the ideas from the various other hints, here is a function I came up with to do it locally for any man page: I know I call man -w twice, but that's to avoid any temporary variables - YMMV.

Mac Os X Sed Man Page

Close down the system at a given time.
Shutdown provides an automated shutdown procedure for super-users to nicely notify users when the system is shutting down, saving them from system administrators, hackers, and gurus, who would otherwise not bother with such niceties.

Mac Os X Man Pages Free

At intervals, becoming more frequent as apocalypse approaches and starting at ten hours before shutdown, warning messages are displayed on the terminals of all users logged in.

At shutdown time a message is written in the system log, containing the time of shutdown, who initiated the shutdown and the reason. A terminate signal is then sent to launchd to bring the system down to single-user state (depending on above options).

A scheduled shutdown can be canceled by killing the shutdown process (a SIGTERM should suffice).

FILES
/etc/nologin tells login not to let anyone log in
/fastboot tells rc(8) not to run fsck when rebooting
/usr/libexec/upsshutdown - Run a command when the UPS shuts down.

Examples

Reboot the machine immediately:
$ sudo shutdown -r now

Send the machine to sleep in 30 minutes:
$ sudo shutdown -s +30

Shutdown the machine in 60 minutes:
$ sudo shutdown -h +60

Cancel any of the above:
$ sudo killall shutdown

“Do all men kill the things they do not love?” ~ The Merchant of Venice

Related macOS commands:

kill - Stop a process from running.
login - log into the computer.
osascript - shutdown/restart via AppleScript.
pmset - sleep now.
sudo poweroff
wall - write a message to users.
fastboot(8)
reboot - Stop and restart the system.
uptime - Show how long system has been running.

Copyright © 1999-2021 SS64.com
Some rights reserved