UNIXでは 数多くのコマンドを実行でき, コマンドのオプションの種類も多岐に 渡っています. そのため多くのコマンドには利用方法を記載した オンラインマニュアルが用意されています.
オンラインマニュアルを表示するにはmanコマンドを実行します. 引数として使い方を調べたいコマンド名を入力します.
man [使い方を調べたいコマンド名]
lsコマンドのオンラインマニュアル 参照例を次に示します. マニュアル閲覧中のページの移動方法はless を参照してください.
% man ls <ENTER> LS(1) BSD General Commands Manual LS(1) NAME ls - list directory contents SYNOPSIS ls [-ABCFGHLPRTWZabcdfghiklmnopqrstuwx1] [file ...] DESCRIPTION For each operand that names a file of a type other than directory, ls displays its name as well as any requested, associated information. For each operand that names a file of type directory, ls displays the names of files contained within that directory, as well as any requested, asso- ciated information. If no operands are given, the contents of the current directory are dis- played. If more than one operand is given, non-directory operands are displayed first; directory and non-directory operands are sorted sepa- rately and in lexicographical order. The following options are available: -A List all entries except for . and ... Always set for the super-
また,コマンドの中にはmanコマンドで 使い方を調べられないものもあります. そのようなコマンドの場合,調べたいコマンドに続いて, オプションとして-hや-help を指定すると,使用方法を調べられるものもあります. 次に,platexコマンド の使い方をmanコマンドで調べられないので, platexコマンドに -hオプションを指定して調べた例を示します.
% man platex <ENTER> No manual entry for platex % platex -h <ENTER> Usage: ptex [option] texfile ptex [option] &format texfile -fmt=NAME use NAME instead of program name or %&format. -progname=NAME pretend to be program NAME. (this affects both format and search path) -ini be iniptex. -interaction={batchmode/nonstopmode/scrollmode/errorstopmode} -shell-escape enable the \write18{shell command} construct. -version print version information and exit. -help print this message and exit. Email bug reports to www-ptex@ascii.co.jp % _
モノクロ,カラープリンタでPSファイルを印刷するには, lprコマンド(Line PRinter)を使用します. -Pオプションの直後にスペースを空けずに出力したいプリンタ名 を指定します. また, 同じファイルを複数部印刷したい場合には, プリンタ名の後にスペースを空けてから, -#部数で指定します. 次に書式を示します.
lpr -P[プリンタ名] [-#部数] [ファイル名]
次に,カレントディレクトリにある `filememo.ps' というファイルをnps4プリンタで印刷し, 続いてカレントディレクトリにあるファイル `file.ps'をnps12で3部印刷する例を示します.
% lpr -Pnps4 filememo.ps <ENTER> % lpr -Pnps12 -#3 file.ps <ENTER> % _
Emacsを起動するには,シェルに次のように入力します.
% emacs & <ENTER>
リモートログイン して Emacsを利用する場合は`&'をつけずに `emacs'と入力して ターミナルウィンドウ内にEmacsを起動させます.
Emacsを終了するには,C-x C-cを入力します. Emacsを終了するとき変更個所が保存されていないファイルがある場合は, 次のように確認を求められます.
ここでyを押すと,ファイルを保存してEmacsは終了します. 保存せずにEmacsを終了するときは,nを押します. その際,次のようにもう一度終了確認を求められます.
ここでyesを入力すると,Emacsは終了します.
編集内容が保存されている場合など, 保存の必要がないときには, エコーエリアに次のように表示されEmacsが終了します.