Man Pages | Navigating with Less

21 01 2008
I ended the Realcrypt Howto with instructions about navigating a man page. It really deserves its own post, so I’m reposting the navigation commands here as well as expanding the topic.

When you’re not sure about the usage of a program, ‘Google is your friend’ but an even better friend generally is the programs man page [manual page]. It’s where you should always start your search. The documentation in the program’s manual is usually quite extensive and is likely all you’ll need. Man pages use a common layout – Name; Synopsis; Description/[Options]; Examples, See also.

To read a programs man page: man {program-name}

Related commands are whatis and apropos: whatis searches the short man page descriptions in the whatis database and outputs a one line description. apropos searches the whatis database for strings.

whatis Usage:

  • whatis gpg

Output:

  • gpg (1) – OpenPGP encryption and signing tool
  • gpg-agent (1) – Secret key management for GnuPG
  • gpg-connect-agent (1) – Communicate with a running agent
  • gpg-preset-passphrase (1) – Put a passphrase into gpg-agent’s cache

apropos Usage:

  • apropos gpg

Output:

  • applygnupgdefaults (8) – Run gpgconf –apply-defaults for all users
  • gpg (1) – OpenPGP encryption and signing tool
  • gpg2 (1) – OpenPGP encryption and signing tool
  • gpg-agent (1) – Secret key management for GnuPG
  • gpgconf (1) – Modify .gnupg home directories
  • gpg-connect-agent (1) – Communicate with a running agent
  • gpgparsemail (1) – Parse a mail message into an annotated format
  • gpg-preset-passphrase (1) – Put a passphrase into gpg-agent’s cache
  • gpgsm (1) – CMS encryption and signing tool
  • gpgsm-gencert.sh [gpgsm-gencert] (1) – Generate an X.509 certificate request
  • gpgsplit (1) – Split an OpenPGP message into packets
  • gpgv (1) – Verify OpenPGP signatures
  • gpgv2 (1) – Verify OpenPGP signatures
  • keychain (1) – re-use ssh-agent and/or gpg-agent between logins
  • radeonhd (4) – AMD GPG (ATI) R5xx/R6xx video driver

Less is a program that is used to view text files from the terminal | example: less letter.pdf . The viewing of Man Pages is done with Less. The key commands for Less are:

  • Page Down = Spacebar or the ‘Page Down’ Key
  • Page Up = b or the ‘Page Up’ Key
  • Line Down = j or the ‘Down Arrow’ Key
  • Line Up = k or the ‘Up Arrow’ Key
  • Top of Document = g
  • Bottom of Document = G
  • Quit = q
  • Search = / to search forward [example /keyfile ] |or| ? to search backward [ ?keyfile ]
  • Repeat Search = n to repeat the search forward and N to repeat the search in the opposite direction
  • Help = h | Will give you the full summary of Less commands. ;-)
This work is licensed under a
Creative Commons Licence.

Blogged with Flock

Tags: , , , , , , , ,

Advertisements

Actions

Information

One response

25 02 2011

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: