man はUNIXにおけるオンラインマニュアルを見るためのコマンドである。
標準では英語で表示されるが、最近のLinuxなどでは日本語で表示されることもある。
# man [-f] [-k] コマンド名またはキーワード ...
コンソールの1画面より長いマニュアルを表示する場合はSpaceを押すと次の画面に進む。
calというコマンドをmanコマンドで調べてみよう。
# man cal CAL(1) UNIX Reference Manual CAL(1) NAME cal - displays a calendar <- コマンドの名前と目的 SYNOPSIS cal [-jy] [month [year]] <- コマンドの使用形式 DESCRIPTION <- コマンドの説明 Cal displays a simple calendar. If arguments are not specified, the cur- rent month is displayed. The options are as follows: -j Display julian dates (days one-based, numbered from January 1). -y Display a calendar for the current year. A single parameter specifies the year (1 - 9999) to be displayed; note the year must be fully specified: ``cal 89'' will not display a calendar for 1989. Two parameters denote the month (1 - 12) and year. If no pa- rameters are specified, the current month's calendar is displayed. A year starts on Jan 1. The Gregorian Reformation is assumed to have occurred in 1752 on the 3rd of September. By this time, most countries had recognized the reforma- tion (although a few did not recognize it until the early 1900's.) Ten days following that date were eliminated by the reformation, so the cal- endar for that month is a bit unusual. HISTORY <- コマンドの歴史 A cal command appeared in Version 6 AT&T UNIX. BSD Experimental June 6, 1993 1
次にpasswdというコマンドをmanコマンドの-fオプションで調べてみよう。
# man -f passwd passwd (1) - change user password passwd (5) - The password file
dateというキーワードで-kオプションを使って関係のあるコマンドを一覧表示してみると以下のようになる。
# man -k date localtime (3) - transform binary date and time to ASCII gmtime (3) - transform binary date and time to ASCII netdate (8) - set date and time by ARPA Internet RFC 868 822-date (1) - Print date and time in RFC822 format ftime (3) - return date and time mktime (3) - transform binary date and time to ASCII date (1) - print or set the system date and time asctime (3) - transform binary date and time to ASCII ctime (3) - transform binary date and time to ASCII strftime (3) - format date and time rdate (8) - set the system's date from a remote host