逆引きUNIXコマンド/manコマンドの各セクション
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
*manコマンドの各セクションの説明 [#o2b65200]
manコマンドの各セクションに対応する内容を下表にまとめまし...
また、manコマンドにセクション番号を付けた使用例を以下に記...
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
#contents
* 関連資料 [#mcb3e1c6]
-[[manコマンドのキー操作>逆引きUNIXコマンド/manコマンドの...
** 各セクションの説明(表) [#h746f941]
/usr/share/man/ディレクトリを見れば、どのような資料が格納...
|セクション|分類|
|P|POSIX関連(各種ヘッダファイルの説明など)|
|1|一般的なコマンド|
|2|(Linuxカーネル)システムコール関連|
|3|標準Cライブラリ関数|
|4|スペシャルファイル関連(/dev/xxx関連)|
|5|特定のファイル構造と利用しているプログラムの説明など|
|6|ゲーム|
|7|プロトコルや規格など|
|8|管理者が利用するコマンドなど|
* 各セクションの実行例 [#n1a6fac3]
manコマンドにセクション番号を引数として渡さなくても、man...
セクション番号を指定しないと、適切ではないmanページが表示...
これは、writeやreadをmanコマンドで調べた場合、複数のセク...
(例)
- write : コマンド(1)とシステムコール(2)に存在している
このような場合は、セクションを指定してmanコマンドを使用す...
* manコマンドの実行例 [#bcf38114]
各セクションを指定してmanコマンドを実行した結果を以下に記...
尚、CentOSで実行しました。
** man P の実行例 [#q3bc29af]
$ man P stdio.h
<stdio.h>(P) POSIX Programmer’s Manual ...
PROLOG
This manual page is part of the POSIX Programmer...
tion of this interface may differ (consult the co...
details of Linux behavior), or the interface may ...
NAME
stdio.h - standard buffered input/output
SYNOPSIS
#include <stdio.h>
DESCRIPTION
Some of the functionality described on this refer...
dard. Applications shall define the appropriate f...
Interfaces volume of IEEE Std 1003.1-2001, Sect...
ment) to enable the visibility of these symbols i...
<snip>
** man 1 の実行例 [#y98cc4dd]
$ man 1 ls
LS(1) ...
名前
ls, dir, vdir - ディレクトリの中身をリスト表示する
書式
ls [options] [file...]
POSIX オプション: [-CFRacdilqrtu1]
GNU オプション (簡略形式): [-1abcdfghiklmnopqrs...
cols] [-I pattern] [--block-size=SIZE] [--classif...
[--file-type] [--full-time] [--format={acro...
bose,vertical}] [--human-readable] [--indicator...
[--quoting-style={c,clocale,escape,literal,locale...
[--show-control-chars] [--si] [--sort={n...
[--time={atime,access,ctime,status,use}] [--help]...
<snip>
** man 2 の実行例 [#i980108d]
$ man 2 setuid
SETUID(2) Linux Programmer’s Manual ...
名前
setuid - ユーザー識別 (identity) を設定する
書式
#include <sys/types.h>
#include <unistd.h>
int setuid(uid_t uid);
説明
setuid() は現在のプロセスの実効 (effective) ユー...
プロセスの実効 UID が root ならば、実 (real) UID ...
される。
<snip>
** man 3 の実行例 [#dea3a064]
$ man 3 malloc
MALLOC(3) Linux Programmer’s Manual ...
名前
calloc, malloc, free, realloc - 動的なメモリの割...
書式
#include <stdlib.h>
void *calloc(size_t nmemb, size_t size);
void *malloc(size_t size);
void free(void *ptr);
void *realloc(void *ptr, size_t size);
説明
calloc() は size バイトの要素 nmemb 個からなる配...
たメモリに対するポインタを返す。メモリの内容は数...
セットされる。
malloc() は size バイトを割り当て、割り当てられ...
モリの内容はクリアされない。
<snip>
** man 4 の実行例 [#o5aab3d7]
$ man 4 null
NULL(4) Linux Programmer’s Manual ...
名前
null, zero - データの掃きだめ
説明
null または zero スペシャルファイル(special file)...
null スペシャルファイルを読むと常に end of file ...
に \0 文字(null 文字)が返される。
null と zero は一般的に次のようにして作られる:
mknod -m 666 /dev/null c 1 3
mknod -m 666 /dev/zero c 1 5
chown root:root /dev/null /dev/zero
注意
もし、これらのデバイスが全てのユーザに対して読み...
ムの動作がおかしくなるだろう。
ファイル
/dev/null
/dev/zero
<snip>
** man 5 の実行例 [#q45c54c4]
$ man 5 nfs
NFS(5) Linux Programmer’s Manual ...
名前
nfs - NFS 関係の fstab フォーマットとオプション
書式
/etc/fstab
説明
fstab ファイルにはファイルシステムをマウントする...
が記述されている。 NFS マウントの場合は、マウント...
のサーバーでエキスポートされているディレクトリ、...
レクトリ、ファイルシステムのマウント方法を制御す...
れる。
以下は /etc/fstab ファイルにおける NFS マウント...
server:/usr/local/pub /pub nfs rsize=8192...
オプション
rsize=n NFS サーバからファイルを読み込む際...
数を指定する。デフォルト値はカーネ...
。 (しかし rsize=8192 でうまく動...
上する。)
<snip>
** man 6 の実行例 [#r55f5136]
$ man 6 pom
POM(6) ...
名称
pom - 月齢表示
書式
pom
解説
pom ユーティリティは今日の月齢を表示します。ソフ...
経営上の判断を行なうのに役に立ちます。
<snip>
** man 7 の実行例 [#a40e2eef]
$ man 7 ascii
ASCII(7) Linux Programmer’s Manual ...
名前
ascii - ASCII 文字集合の 8 進数、10 進数、16 進数...
説明
ASCII は、情報交換用米国標準コード (American Sta...
change) の略で、7 ビットのコードである。 (ISO 885...
ードでは下半分に ASCII を含んでいる。ASCII は国際...
ている。
以下の表は 128 文字の ASCII 文字をまとめたもので...
C プログラムでの ’\X’ エスケープも注記してある。
Oct Dec Hex Char Oct...
-------------------------------------------------...
000 0 00 NUL ’\0’ 100...
001 1 01 SOH (ヘッダ開始) 101...
002 2 02 STX (テキスト開始) 102...
003 3 03 ETX (テキスト終了) 103...
<snip>
** man 8 の実行例 [#q19ed0e6]
$ man 8 useradd
USERADD(8) ...
名前
useradd - 新規ユーザの作成・新規ユーザのデフォル...
書式
useradd [-c comment] [-d home_dir]
[-e expire_date] [-f inactive_time]
[-g initial_group] [-G group[,...]]
[-m [-k skeleton_dir]] [-o] [-p passwd]
[-s shell] [-u uid] login
useradd -D [-g default_group] [-b default_home]
[-e default_expire_date] [-f default_inac...
[-s default_shell]
説明
新規ユーザの作成
<snip>
#br
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
#br
終了行:
#navi(../)
*manコマンドの各セクションの説明 [#o2b65200]
manコマンドの各セクションに対応する内容を下表にまとめまし...
また、manコマンドにセクション番号を付けた使用例を以下に記...
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
#contents
* 関連資料 [#mcb3e1c6]
-[[manコマンドのキー操作>逆引きUNIXコマンド/manコマンドの...
** 各セクションの説明(表) [#h746f941]
/usr/share/man/ディレクトリを見れば、どのような資料が格納...
|セクション|分類|
|P|POSIX関連(各種ヘッダファイルの説明など)|
|1|一般的なコマンド|
|2|(Linuxカーネル)システムコール関連|
|3|標準Cライブラリ関数|
|4|スペシャルファイル関連(/dev/xxx関連)|
|5|特定のファイル構造と利用しているプログラムの説明など|
|6|ゲーム|
|7|プロトコルや規格など|
|8|管理者が利用するコマンドなど|
* 各セクションの実行例 [#n1a6fac3]
manコマンドにセクション番号を引数として渡さなくても、man...
セクション番号を指定しないと、適切ではないmanページが表示...
これは、writeやreadをmanコマンドで調べた場合、複数のセク...
(例)
- write : コマンド(1)とシステムコール(2)に存在している
このような場合は、セクションを指定してmanコマンドを使用す...
* manコマンドの実行例 [#bcf38114]
各セクションを指定してmanコマンドを実行した結果を以下に記...
尚、CentOSで実行しました。
** man P の実行例 [#q3bc29af]
$ man P stdio.h
<stdio.h>(P) POSIX Programmer’s Manual ...
PROLOG
This manual page is part of the POSIX Programmer...
tion of this interface may differ (consult the co...
details of Linux behavior), or the interface may ...
NAME
stdio.h - standard buffered input/output
SYNOPSIS
#include <stdio.h>
DESCRIPTION
Some of the functionality described on this refer...
dard. Applications shall define the appropriate f...
Interfaces volume of IEEE Std 1003.1-2001, Sect...
ment) to enable the visibility of these symbols i...
<snip>
** man 1 の実行例 [#y98cc4dd]
$ man 1 ls
LS(1) ...
名前
ls, dir, vdir - ディレクトリの中身をリスト表示する
書式
ls [options] [file...]
POSIX オプション: [-CFRacdilqrtu1]
GNU オプション (簡略形式): [-1abcdfghiklmnopqrs...
cols] [-I pattern] [--block-size=SIZE] [--classif...
[--file-type] [--full-time] [--format={acro...
bose,vertical}] [--human-readable] [--indicator...
[--quoting-style={c,clocale,escape,literal,locale...
[--show-control-chars] [--si] [--sort={n...
[--time={atime,access,ctime,status,use}] [--help]...
<snip>
** man 2 の実行例 [#i980108d]
$ man 2 setuid
SETUID(2) Linux Programmer’s Manual ...
名前
setuid - ユーザー識別 (identity) を設定する
書式
#include <sys/types.h>
#include <unistd.h>
int setuid(uid_t uid);
説明
setuid() は現在のプロセスの実効 (effective) ユー...
プロセスの実効 UID が root ならば、実 (real) UID ...
される。
<snip>
** man 3 の実行例 [#dea3a064]
$ man 3 malloc
MALLOC(3) Linux Programmer’s Manual ...
名前
calloc, malloc, free, realloc - 動的なメモリの割...
書式
#include <stdlib.h>
void *calloc(size_t nmemb, size_t size);
void *malloc(size_t size);
void free(void *ptr);
void *realloc(void *ptr, size_t size);
説明
calloc() は size バイトの要素 nmemb 個からなる配...
たメモリに対するポインタを返す。メモリの内容は数...
セットされる。
malloc() は size バイトを割り当て、割り当てられ...
モリの内容はクリアされない。
<snip>
** man 4 の実行例 [#o5aab3d7]
$ man 4 null
NULL(4) Linux Programmer’s Manual ...
名前
null, zero - データの掃きだめ
説明
null または zero スペシャルファイル(special file)...
null スペシャルファイルを読むと常に end of file ...
に \0 文字(null 文字)が返される。
null と zero は一般的に次のようにして作られる:
mknod -m 666 /dev/null c 1 3
mknod -m 666 /dev/zero c 1 5
chown root:root /dev/null /dev/zero
注意
もし、これらのデバイスが全てのユーザに対して読み...
ムの動作がおかしくなるだろう。
ファイル
/dev/null
/dev/zero
<snip>
** man 5 の実行例 [#q45c54c4]
$ man 5 nfs
NFS(5) Linux Programmer’s Manual ...
名前
nfs - NFS 関係の fstab フォーマットとオプション
書式
/etc/fstab
説明
fstab ファイルにはファイルシステムをマウントする...
が記述されている。 NFS マウントの場合は、マウント...
のサーバーでエキスポートされているディレクトリ、...
レクトリ、ファイルシステムのマウント方法を制御す...
れる。
以下は /etc/fstab ファイルにおける NFS マウント...
server:/usr/local/pub /pub nfs rsize=8192...
オプション
rsize=n NFS サーバからファイルを読み込む際...
数を指定する。デフォルト値はカーネ...
。 (しかし rsize=8192 でうまく動...
上する。)
<snip>
** man 6 の実行例 [#r55f5136]
$ man 6 pom
POM(6) ...
名称
pom - 月齢表示
書式
pom
解説
pom ユーティリティは今日の月齢を表示します。ソフ...
経営上の判断を行なうのに役に立ちます。
<snip>
** man 7 の実行例 [#a40e2eef]
$ man 7 ascii
ASCII(7) Linux Programmer’s Manual ...
名前
ascii - ASCII 文字集合の 8 進数、10 進数、16 進数...
説明
ASCII は、情報交換用米国標準コード (American Sta...
change) の略で、7 ビットのコードである。 (ISO 885...
ードでは下半分に ASCII を含んでいる。ASCII は国際...
ている。
以下の表は 128 文字の ASCII 文字をまとめたもので...
C プログラムでの ’\X’ エスケープも注記してある。
Oct Dec Hex Char Oct...
-------------------------------------------------...
000 0 00 NUL ’\0’ 100...
001 1 01 SOH (ヘッダ開始) 101...
002 2 02 STX (テキスト開始) 102...
003 3 03 ETX (テキスト終了) 103...
<snip>
** man 8 の実行例 [#q19ed0e6]
$ man 8 useradd
USERADD(8) ...
名前
useradd - 新規ユーザの作成・新規ユーザのデフォル...
書式
useradd [-c comment] [-d home_dir]
[-e expire_date] [-f inactive_time]
[-g initial_group] [-G group[,...]]
[-m [-k skeleton_dir]] [-o] [-p passwd]
[-s shell] [-u uid] login
useradd -D [-g default_group] [-b default_home]
[-e default_expire_date] [-f default_inac...
[-s default_shell]
説明
新規ユーザの作成
<snip>
#br
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
#br
ページ名: