--- /dev/null
+.\" Copyright (C) Andreas Gruenbacher, February 2001
+.\" Copyright (C) Silicon Graphics Inc, September 2001
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI
+.\" all rights reserved.
+.\" Translated Tue Jul 8 02:47:19 JST 2003
+.\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH GETXATTR 2 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+getxattr, lgetxattr, fgetxattr \- 拡張属性の値を取得する
+.SH 書式
+.fam C
+.nf
+\fB#include <sys/types.h>\fP
+\fB#include <sys/xattr.h>\fP
+.PP
+\fBssize_t getxattr(const char\ *\fP\fIpath\fP\fB, const char\ *\fP\fIname\fP\fB,\fP
+\fB void\ *\fP\fIvalue\fP\fB, size_t \fP\fIsize\fP\fB);\fP
+\fBssize_t lgetxattr(const char\ *\fP\fIpath\fP\fB, const char\ *\fP\fIname\fP\fB,\fP
+\fB void\ *\fP\fIvalue\fP\fB, size_t \fP\fIsize\fP\fB);\fP
+\fBssize_t fgetxattr(int \fP\fIfd\fP\fB, const char\ *\fP\fIname\fP\fB,\fP
+\fB void\ *\fP\fIvalue\fP\fB, size_t \fP\fIsize\fP\fB);\fP
+.fi
+.fam T
+.SH 説明
+Extended attributes are \fIname\fP:\fIvalue\fP pairs associated with inodes
+(files, directories, symbolic links, etc.). They are extensions to the
+normal attributes which are associated with all inodes in the system (i.e.,
+the \fBstat\fP(2) data). A complete overview of extended attributes concepts
+can be found in \fBxattr\fP(7).
+.PP
+\fBgetxattr\fP() retrieves the value of the extended attribute identified by
+\fIname\fP and associated with the given \fIpath\fP in the filesystem. The
+attribute value is placed in the buffer pointed to by \fIvalue\fP; \fIsize\fP
+specifies the size of that buffer. The return value of the call is the
+number of bytes placed in \fIvalue\fP.
+.PP
+\fBlgetxattr\fP() は \fBgetxattr\fP() と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル
+ではなく、リンクそのものの情報を取得する点だけが異なる。
+.PP
+\fBfgetxattr\fP() は \fBgetxattr\fP() と同じだが、 \fIpath\fP の代わりに \fIfd\fP
+で参照されたオープン済みファイルの情報だけを取得する点が異なる (\fIfd\fP は \fBopen\fP(2) によって返される)。
+.PP
+An extended attribute \fIname\fP is a null\-terminated string. The name
+includes a namespace prefix; there may be several, disjoint namespaces
+associated with an individual inode. The value of an extended attribute is
+a chunk of arbitrary textual or binary data that was assigned using
+\fBsetxattr\fP(2).
+.PP
+If \fIsize\fP is specified as zero, these calls return the current size of the
+named extended attribute (and leave \fIvalue\fP unchanged). This can be used
+to determine the size of the buffer that should be supplied in a subsequent
+call. (But, bear in mind that there is a possibility that the attribute
+value may change between the two calls, so that it is still necessary to
+check the return status from the second call.)
+.SH 返り値
+On success, these calls return a nonnegative value which is the size (in
+bytes) of the extended attribute value. On failure, \-1 is returned and
+\fIerrno\fP is set appropriately.
+.SH エラー
+.TP
+\fBE2BIG\fP
+The size of the attribute value is larger than the maximum size allowed; the
+attribute cannot be retrieved. This can happen on filesystems that support
+very large attribute values such as NFSv4, for example.
+.TP
+\fBENODATA\fP
+.\" .RB ( ENOATTR
+.\" is defined to be a synonym for
+.\" .BR ENODATA
+.\" in
+.\" .IR <attr/attributes.h> .)
+The named attribute does not exist, or the process has no access to this
+attribute.
+.TP
+\fBENOTSUP\fP
+拡張属性がそのファイルシステムでサポートされていない、 もしくは無効になっている。
+.TP
+\fBERANGE\fP
+\fIvalue\fP バッファーの大きさ \fIsize\fP が結果を保持するのに十分な大きさでなかった。
+.PP
+上記に加えて、 \fBstat\fP(2) に書かれているエラーが発生する場合もある。
+.SH バージョン
+これらのシステムコールはカーネル 2.4 以降の Linux で利用できる。 glibc でのサポートはバージョン 2.3 以降で行われている。
+.SH 準拠
+.\" .SH AUTHORS
+.\" Andreas Gruenbacher,
+.\" .RI < a.gruenbacher@computer.org >
+.\" and the SGI XFS development team,
+.\" .RI < linux-xfs@oss.sgi.com >.
+.\" Please send any bug reports or comments to these addresses.
+これらのシステムコールは Linux 独自である。
+.SH 例
+\fBlistxattr\fP(2) を参照。
+.SH 関連項目
+\fBgetfattr\fP(1), \fBsetfattr\fP(1), \fBlistxattr\fP(2), \fBopen\fP(2),
+\fBremovexattr\fP(2), \fBsetxattr\fP(2), \fBstat\fP(2), \fBsymlink\fP(7), \fBxattr\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
.IP
\fBSPU_CREATE_ISOLATE\fP コンテキストを作成するには \fBSPU_CREATE_NOSCHED\fP フラグも指定する必要がある。
.TP
-\fBSPU_CREATE_AFFINITY_SPU\fP (since Linux 2.6.23)
+\fBSPU_CREATE_AFFINITY_SPU\fP (Linux 2.6.23 以降)
.\" commit 8e68e2f248332a9c3fd4f08258f488c209bd3e0c
別の SPU コンテキストと affinity (親和性) を持ったコンテキストを作成する。 この affinity 情報は SPU
スケジューリングアルゴリズムで使用される。 このフラグを使う際には、 他の SPU コンテキストを指すファイルディスクリプターを
\fIneighbor_fd\fP 引き数を渡す必要がある。
.TP
-\fBSPU_CREATE_AFFINITY_MEM\fP (since Linux 2.6.23)
+\fBSPU_CREATE_AFFINITY_MEM\fP (Linux 2.6.23 以降)
.\" commit 8e68e2f248332a9c3fd4f08258f488c209bd3e0c
システムメモリーと affinity (親和性) を持ったコンテキストを作成する。 この affinity 情報は SPU
スケジューリングアルゴリズムで使用される。
\fIpathname\fP の一部がディレクトリではない。
.TP
\fBEPERM\fP
-The \fBSPU_CREATE_NOSCHED\fP flag has been given, but the user does not have
-the \fBCAP_SYS_NICE\fP capability.
+\fBSPU_CREATE_NOSCHED\fP フラグが指定されたが、ユーザーが \fBCAP_SYS_NICE\fP ケーパビリティを持っていない。
.SH ファイル
\fIpathname\fP は \fBspufs\fP のマウントポイントの配下の場所を指して
いなければならない。 慣例では \fI/spu\fP にマウントされる。
Prior to the addition of the \fBSPU_CREATE_AFFINITY_SPU\fP flag in Linux
2.6.23, the \fBspu_create\fP() system call took only three arguments (i.e.,
there was no \fIneighbor_fd\fP argument).
-.SH EXAMPLES
+.SH 例
\fBspu_create\fP() の利用例については \fBspu_run\fP(2) を参照。
.SH 関連項目
\fBclose\fP(2), \fBspu_run\fP(2), \fBcapabilities\fP(7), \fBspufs\fP(7)
.UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/
.UE
を参照のこと。
-.SH EXAMPLES
+.SH 例
以下は、簡単な 1 命令の SPU プログラムを \fBspu_run\fP() システムコールを使って実行させる例である。
.PP
.EX
\fBNote\fP: if you are looking for information about the \fBsysfs\fP filesystem
that is normally mounted at \fI/sys\fP, see \fBsysfs\fP(5).
.PP
-The (obsolete) \fBsysfs\fP() system call returns information about the
-filesystem types currently present in the kernel. The specific form of the
-\fBsysfs\fP() call and the information returned depends on the \fIoption\fP in
-effect:
+(廃止予定の) \fBsysfs\fP() システムコールは、現在カーネル (kernel) に存在しているファイルシステムの型 (type) 情報を返す。
+それぞれの \fBsysfs\fP() コールの形式と返される情報は \fIoption\fP に依存しており、それは:
.TP 3
\fB1\fP
ファイルシステム識別文字列 (identifier string) \fIfsname\fP をファイルシステムの型インデックス (type index)
.SH 準拠
SVr4.
.SH 注意
-This System\-V derived system call is obsolete; don't use it. On systems
-with \fI/proc\fP, the same information can be obtained via \fI/proc\fP; use that
-interface instead.
+この System\-V 由来のシステムコールは廃止予定 (obsolete) であり、 使用しないこと。 \fI/proc\fP
+が利用できるシステムでは、同じ情報が \fI/proc\fP 経由で取得でき、このインターフェースを使用すること。
.SH バグ
libc または glibc のサポートは存在しない。 \fIbuf\fP の大きさがどれだけ必要かを推測する方法がない。
.SH 関連項目
.\" u_short fts_flags; /* private flags for FTSENT structure */
.\" u_short fts_instr; /* fts_set() instructions */
typedef struct _ftsent {
- unsigned short fts_info; /* flags for FTSENT structure */
- char *fts_accpath; /* access path */
- char *fts_path; /* root path */
+ unsigned short fts_info; /* FTSENT 構造体のためのフラグ */
+ char *fts_accpath; /* アクセスパス */
+ char *fts_path; /* ルートパス */
short fts_pathlen; /* strlen(fts_path) +
strlen(fts_name) */
- char *fts_name; /* filename */
+ char *fts_name; /* ファイル名 */
short fts_namelen; /* strlen(fts_name) */
- short fts_level; /* depth (\-1 to N) */
- int fts_errno; /* file errno */
- long fts_number; /* local numeric value */
- void *fts_pointer; /* local address value */
- struct _ftsent *fts_parent; /* parent directory */
- struct _ftsent *fts_link; /* next file structure */
- struct _ftsent *fts_cycle; /* cycle structure */
- struct stat *fts_statp; /* stat(2) information */
+ short fts_level; /* 深さ (\-1 〜 N) */
+ int fts_errno; /* ファイルのエラー番号 */
+ long fts_number; /* ローカルな番号 */
+ void *fts_pointer; /* ローカルなアドレス番号 */
+ struct _ftsent *fts_parent; /* 親ディレクトリ */
+ struct _ftsent *fts_link; /* 次のファイル構造体 */
+ struct _ftsent *fts_cycle; /* 循環している構造体 */
+ struct stat *fts_statp; /* stat(2) の情報 */
} FTSENT;
.EE
.in
--- /dev/null
+.\" Copyright (c) 1993 Michael Haardt (michael@moria.de)
+.\" and copyright (c) 1999 Andries Brouwer (aeb@cwi.nl)
+.\" and copyright (c) 2006 Justin Pryzby <justinpryzby@users.sf.net>
+.\" and copyright (c) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\" Modified Sun Jul 25 11:02:22 1993 by Rik Faith (faith@cs.unc.edu)
+.\" 2006-05-24, Justin Pryzby <justinpryzby@users.sf.net>
+.\" document FTW_ACTIONRETVAL; include .SH RETURN VALUE;
+.\" 2006-05-24, Justin Pryzby <justinpryzby@users.sf.net> and
+.\" Michael Kerrisk <mtk.manpages@gmail.com>
+.\" reorganized and rewrote much of the page
+.\" 2006-05-24, Michael Kerrisk <mtk.manpages@gmail.com>
+.\" Added an example program.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated 1998-04-28, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated & Modified 1999-09-14, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated & Modified 2005-11-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2006-07-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
+.\"
+.TH FTW 3 2020\-06\-09 Linux "Linux Programmer's Manual"
+.SH 名前
+ftw, nftw \- ファイルツリーを歩きまわる
+.SH 書式
+.nf
+\fB#include <ftw.h>\fP
+.PP
+\fBint nftw(const char *\fP\fIdirpath\fP\fB,\fP
+\fB int (*\fP\fIfn\fP\fB) (const char *\fP\fIfpath\fP\fB, const struct stat *\fP\fIsb\fP\fB,\fP
+\fB int \fP\fItypeflag\fP\fB, struct FTW *\fP\fIftwbuf\fP\fB),\fP
+\fB int \fP\fInopenfd\fP\fB, int \fP\fIflags\fP\fB);\fP
+.PP
+\fB#include <ftw.h>\fP
+.PP
+\fBint ftw(const char *\fP\fIdirpath\fP\fB,\fP
+\fB int (*\fP\fIfn\fP\fB) (const char *\fP\fIfpath\fP\fB, const struct stat *\fP\fIsb\fP\fB,\fP
+\fB int \fP\fItypeflag\fP\fB),\fP
+\fB int \fP\fInopenfd\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
+.RE
+.PP
+\fBnftw\fP(): _XOPEN_SOURCE >= 500
+.SH 説明
+\fBnftw\fP() walks through the directory tree that is located under the
+directory \fIdirpath\fP, and calls \fIfn\fP() once for each entry in the tree. By
+default, directories are handled before the files and subdirectories they
+contain (preorder traversal).
+.PP
+To avoid using up all of the calling process's file descriptors, \fInopenfd\fP
+specifies the maximum number of directories that \fBnftw\fP() will hold open
+simultaneously. When the search depth exceeds this, \fBnftw\fP() will become
+slower because directories have to be closed and reopened. \fBnftw\fP() uses
+at most one file descriptor for each level in the directory tree.
+.PP
+For each entry found in the tree, \fBnftw\fP() calls \fIfn\fP() with four
+arguments: \fIfpath\fP, \fIsb\fP, \fItypeflag\fP, and \fIftwbuf\fP. \fIfpath\fP is the
+pathname of the entry, and is expressed either as a pathname relative to the
+calling process's current working directory at the time of the call to
+\fBnftw\fP(), if \fIdirpath\fP was expressed as a relative pathname, or as an
+absolute pathname, if \fIdirpath\fP was expressed as an absolute pathname.
+\fIsb\fP is a pointer to the \fIstat\fP structure returned by a call to \fBstat\fP(2)
+for \fIfpath\fP.
+.PP
+The \fItypeflag\fP argument passed to \fIfn\fP() is an integer that has one of
+the following values:
+.TP
+\fBFTW_F\fP
+\fIfpath\fP が通常のファイルである
+.TP
+\fBFTW_D\fP
+\fIfpath\fP がディレクトリである
+.TP
+\fBFTW_DNR\fP
+\fIfpath\fP が読み込みできないディレクトリである
+.TP
+\fBFTW_DP\fP
+\fIfpath\fP がディレクトリで、かつ \fIflags\fP で \fBFTW_DEPTH\fP が指定されていた (\fBFTW_DEPTH\fP が
+\fIflags\fP に指定されていなかった場合、 ディレクトリに対しては常に \fItypeflag\fP が \fBFTW_D\fP で \fIfn\fP()
+が呼び出される)。 \fIfpath\fP 配下のファイルとサブディレクトリは全て処理が終わっている。
+.TP
+\fBFTW_NS\fP
+The \fBstat\fP(2) call failed on \fIfpath\fP, which is not a symbolic link. The
+probable cause for this is that the caller had read permission on the parent
+directory, so that the filename \fIfpath\fP could be seen, but did not have
+execute permission, so that the file could not be reached for \fBstat\fP(2).
+The contents of the buffer pointed to by \fIsb\fP are undefined.
+.TP
+\fBFTW_SL\fP
+.\" To obtain the definition of this constant from
+.\" .IR <ftw.h> ,
+.\" either
+.\" .B _BSD_SOURCE
+.\" must be defined, or
+.\" .BR _XOPEN_SOURCE
+.\" must be defined with a value of 500 or more.
+\fIfpath\fP がシンボリックリンクで、かつ \fBFTW_PHYS\fP が \fIflags\fP に セットされていた。
+.TP
+\fBFTW_SLN\fP
+\fIfpath\fP is a symbolic link pointing to a nonexistent file. (This occurs
+only if \fBFTW_PHYS\fP is not set.) In this case the \fIsb\fP argument passed to
+\fIfn\fP() contains information returned by performing \fBlstat\fP(2) on the
+"dangling" symbolic link. (But see BUGS.)
+.PP
+The fourth argument (\fIftwbuf\fP) that \fBnftw\fP() supplies when calling
+\fIfn\fP() is a pointer to a structure of type \fIFTW\fP:
+.PP
+.in +4n
+.EX
+struct FTW {
+ int base;
+ int level;
+};
+.EE
+.in
+.PP
+\fIbase\fP は、ファイル名 (basename 要素) の、 \fIfpath\fP で渡されるパス名の中でのオフセットである。 \fIlevel\fP
+はディレクトリツリーでの \fIfpath\fP の深さを示す。深さはディレクトリツリーのトップ (root) からの 相対値である (\fIdirpath\fP
+は深さ 0 である)。
+.PP
+ツリーの探索を止めたい場合は、 \fIfn\fP() が 0 以外の値を返せば良い (この値は \fBnftw\fP() 自身の戻り値となる)。
+それ以外の場合は \fBnftw\fP() はツリー全体の探索を続け、すべてのツリーを探索し終えたところで 0 を返す。探索中に (\fBmalloc\fP(3)
+の失敗などの) エラーが起こると \-1 を返す。
+.PP
+\fBnftw\fP() は動的なデータ構造を用いるので、ツリー探索を安全に中断する唯一の方法は 0 以外の値を \fIfn\fP()
+の返り値とすることである。割り込みを扱うには、 例えば発生した割り込みをマークしておいて、 0 以外の値を返すようにする
+シグナルによりメモリーリークを起こさずに探索を終了できるようにするには、 シグナルハンドラーで \fIfn\fP()
+がチェックするグローバルなフラグをセットするようにすればよい。 プログラムを終了させる場合以外は、 \fBlongjmp\fP(3) を使用しないこと。
+.PP
+The \fIflags\fP argument of \fBnftw\fP() is formed by ORing zero or more of the
+following flags:
+.TP
+\fBFTW_ACTIONRETVAL\fP (glibc 2.3.3 以降)
+このフラグは glibc 固有である。 このフラグをセットすると、 \fBnftw\fP() の \fIfn\fP() の返り値の扱いが変わる。 \fIfn\fP()
+は以下の値のいずれか一つを返す必要がある。
+.RS
+.TP
+\fBFTW_CONTINUE\fP
+\fBnftw\fP() は通常通り処理を続ける。
+.TP
+\fBFTW_SKIP_SIBLINGS\fP
+.\" If \fBFTW_DEPTH\fP
+.\" is set, the entry's parent directory is processed next (with
+.\" \fIflag\fP set to \fBFTW_DP\fP).
+\fIfn\fP() がこの値を返した場合、処理中のエントリーの兄弟 (同じ階層のエントリー)
+の処理はスキップされ、親ディレクトリで続きの処理が行われる。
+.TP
+\fBFTW_SKIP_SUBTREE\fP
+\fIfn\fP() が呼び出されたエントリーがディレクトリ (\fItypeflag\fP が \fBFTW_D\fP) の場合に、この値を返すと \fIfn\fP()
+の引き数として渡されたディレクトリ内のエントリーの処理が行われなくなる。 \fBnftw\fP() は処理中のディレクトリの兄弟 (同じ階層のエントリー)
+から処理を続ける。
+.TP
+\fBFTW_STOP\fP
+\fBnftw ()\fP は、返り値 \fBFTW_STOP\fP ですぐに復帰する。
+.PP
+他の返り値は将来新しい動作に対応付けられる可能性がある。 \fIfn\fP() は上記のリストにある値以外を返さないようにすべきである。
+.PP
+\fI<ftw.h>\fP で \fBFTW_ACTIONRETVAL\fP の定義が有効にするためには、
+(「どの」ヘッダーファイルをインクルードするよりも前に) 機能検査マクロ \fB_GNU_SOURCE\fP を定義しなければならない。
+.RE
+.TP
+\fBFTW_CHDIR\fP
+セットされると、ディレクトリの内容を処理する前に そのディレクトリに \fBchdir\fP(2) する。このフラグは、 \fIfpath\fP
+が属すディレクトリで何らかの動作を実行する必要がある場合に 便利である。
+(このフラグを指定しても \fIfn\fP の \fIfpath\fP 引き数で渡されるパス名には影響しない。)
+.TP
+\fBFTW_DEPTH\fP
+セットされると、帰りがけ順探索 (post\-order traversal) を行う。 つまり、ディレクトリそのものを引き数とした \fIfn\fP()
+呼出しは、そのディレクトリに含まれるファイルとサブディレクトリに 対する処理の「後で」行われる
+(デフォルトでは、ディレクトリ自身の処理はディレクトリ内のエントリー より「前に」行なわれる)。
+.TP
+\fBFTW_MOUNT\fP
+セットされると、同じファイルシステムの中だけを探索対象とする (つまり、マウントポイントをまたぐことはない)。
+.TP
+\fBFTW_PHYS\fP
+セットされると、シンボリックリンクを辿らない (おそらくこちらが 通常望ましい動作だろう)。セットされていないとシンボリックリンクを
+辿るが、同じファイルが二回報告されることはない。
+.IP
+\fBFTW_PHYS\fP がセットされずに \fBFTW_DEPTH\fP がセットされると、自分自身に対するシンボリックリンクを配下に持つ
+ディレクトリに対して \fIfn\fP() が呼び出されることは決してない。
+.SS ftw()
+\fBftw\fP() is an older function that offers a subset of the functionality of
+\fBnftw\fP(). The notable differences are as follows:
+.IP * 3
+\fBftw\fP() has no \fIflags\fP argument. It behaves the same as when \fBnftw\fP()
+is called with \fIflags\fP specified as zero.
+.IP *
+The callback function, \fIfn\fP(), is not supplied with a fourth argument.
+.IP *
+The range of values that is passed via the \fItypeflag\fP argument supplied to
+\fIfn\fP() is smaller: just \fBFTW_F\fP, \fBFTW_D\fP, \fBFTW_DNR\fP, \fBFTW_NS\fP, and
+(possibly) \fBFTW_SL\fP.
+.SH 返り値
+これらの関数は、成功すると 0 を、エラーが発生すると \-1 を返す。
+.PP
+\fIfn\fP() が 0 以外を返した場合、ディレクトリツリーの探索を終了し、 \fIfn\fP() が返した値を \fBftw\fP() や
+\fBnftw\fP() の結果として返す。
+.PP
+\fBnftw\fP() が \fBFTW_ACTIONRETVAL\fP フラグ付きで呼ばれた場合、ツリーの探索を終了させるために \fIfn\fP()
+が使用できる、非 0 の値は \fBFTW_STOP\fP だけであり、 この値は \fBnftw\fP() の返り値として返される。
+.SH バージョン
+\fBnftw\fP() は バージョン 2.1 以降の glibc で利用できる。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lb lb lb
+l l l.
+インターフェース 属性 値
+T{
+\fBnftw\fP()
+T} Thread safety MT\-Safe cwd
+T{
+\fBftw\fP()
+T} Thread safety MT\-Safe
+.TE
+.sp 1
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008, SVr4, SUSv1. POSIX.1\-2008 は \fBftw\fP()
+を廃止予定としている。
+.SH 注意
+POSIX.1\-2008 notes that the results are unspecified if \fIfn\fP does not
+preserve the current working directory.
+.PP
+\fBnftw\fP() 関数と、 \fBftw\fP() における \fBFTW_SL\fP は、SUSv1 で導入された。
+.PP
+In some implementations (e.g., glibc), \fBftw\fP() will never use \fBFTW_SL\fP,
+on other systems \fBFTW_SL\fP occurs only for symbolic links that do not point
+to an existing file, and again on other systems \fBftw\fP() will use \fBFTW_SL\fP
+for each symbolic link. If \fIfpath\fP is a symbolic link and \fBstat\fP(2)
+failed, POSIX.1\-2008 states that it is undefined whether \fBFTW_NS\fP or
+\fBFTW_SL\fP is passed in \fItypeflag\fP. For predictable results, use \fBnftw\fP().
+.SH バグ
+.\" https://bugzilla.redhat.com/show_bug.cgi?id=1422736
+.\" http://austingroupbugs.net/view.php?id=1121
+.\" glibc commit 6ba205b2c35e3e024c8c12d2ee1b73363e84da87
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=23501
+According to POSIX.1\-2008, when the \fItypeflag\fP argument passed to \fIfn\fP()
+contains \fBFTW_SLN\fP, the buffer pointed to by \fIsb\fP should contain
+information about the dangling symbolic link (obtained by calling
+\fBlstat\fP(2) on the link). Early glibc versions correctly followed the
+POSIX specification on this point. However, as a result of a regression
+introduced in glibc 2.4, the contents of the buffer pointed to by \fIsb\fP were
+undefined when \fBFTW_SLN\fP is passed in \fItypeflag\fP. (More precisely, the
+contents of the buffer were left unchanged in this case.) This regression
+was eventually fixed in glibc 2.30, so that the glibc implementation (once
+more) follows the POSIX specification.
+.SH 例
+以下のプログラムは、一つ目のコマンドライン引き数を名前に持つパス以下の ディレクトリツリーを探索する。引き数が指定されなかった場合は、
+カレントディレクトリ以下を探索する。 各々のファイルについて様々の情報が表示される。 二番目のコマンドライン引き数に文字を指定することで、
+\fBnftw\fP() を呼び出す際に \fIflags\fP 引き数に渡す値を制御することができる。
+.SS プログラムのソース
+\&
+.EX
+#define _XOPEN_SOURCE 500
+#include <ftw.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+
+static int
+display_info(const char *fpath, const struct stat *sb,
+ int tflag, struct FTW *ftwbuf)
+{
+ printf("%\-3s %2d ",
+ (tflag == FTW_D) ? "d" : (tflag == FTW_DNR) ? "dnr" :
+ (tflag == FTW_DP) ? "dp" : (tflag == FTW_F) ? "f" :
+ (tflag == FTW_NS) ? "ns" : (tflag == FTW_SL) ? "sl" :
+ (tflag == FTW_SLN) ? "sln" : "???",
+ ftwbuf\->level);
+
+ if (tflag == FTW_NS)
+ printf("\-\-\-\-\-\-\-");
+ else
+ printf("%7jd", (intmax_t) sb\->st_size);
+
+ printf(" %\-40s %d %s\en",
+ fpath, ftwbuf\->base, fpath + ftwbuf\->base);
+
+ return 0; /* To tell nftw() to continue */
+}
+
+int
+main(int argc, char *argv[])
+{
+ int flags = 0;
+
+ if (argc > 2 && strchr(argv[2], \(aqd\(aq) != NULL)
+ flags |= FTW_DEPTH;
+ if (argc > 2 && strchr(argv[2], \(aqp\(aq) != NULL)
+ flags |= FTW_PHYS;
+
+ if (nftw((argc < 2) ? "." : argv[1], display_info, 20, flags)
+ == \-1) {
+ perror("nftw");
+ exit(EXIT_FAILURE);
+ }
+
+ exit(EXIT_SUCCESS);
+}
+.EE
+.SH 関連項目
+\fBstat\fP(2), \fBfts\fP(3), \fBreaddir\fP(3)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date. The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein. The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" References consulted:
+.\" Linux libc source code
+.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
+.\" 386BSD man pages
+.\" Modified Sat Jul 24 21:46:57 1993 by Rik Faith (faith@cs.unc.edu)
+.\" Modified 961109, 031115, aeb
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
+.\" Translated 1998-03-01, NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\" Updated 2000-09-03, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2005-03-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\"
+.TH GETMNTENT 3 2019\-03\-06 "" "Linux Programmer's Manual"
+.SH 名前
+getmntent, setmntent, addmntent, endmntent, hasmntopt, getmntent_r \-
+ファイルシステム記述ファイルのエントリーを取得する
+.SH 書式
+.nf
+\fB#include <stdio.h>\fP
+\fB#include <mntent.h>\fP
+.PP
+\fBFILE *setmntent(const char *\fP\fIfilename\fP\fB, const char *\fP\fItype\fP\fB);\fP
+.PP
+\fBstruct mntent *getmntent(FILE *\fP\fIstream\fP\fB);\fP
+.PP
+\fBint addmntent(FILE *\fP\fIstream\fP\fB, const struct mntent *\fP\fImnt\fP\fB);\fP
+.PP
+\fBint endmntent(FILE *\fP\fIstreamp\fP\fB);\fP
+.PP
+\fBchar *hasmntopt(const struct mntent *\fP\fImnt\fP\fB, const char *\fP\fIopt\fP\fB);\fP
+
+/* GNU による拡張 */
+\fB#include <mntent.h>\fP
+.PP
+\fBstruct mntent *getmntent_r(FILE *\fP\fIstreamp\fP\fB, struct mntent *\fP\fImntbuf\fP\fB,\fP
+\fB char *\fP\fIbuf\fP\fB, int \fP\fIbuflen\fP\fB);\fP
+.fi
+.PP
+.RS -4
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照):
+.RE
+.PP
+\fBgetmntent_r\fP():
+ Since glibc 2.19:
+ _DEFAULT_SOURCE
+ Glibc 2.19 and earlier:
+ _BSD_SOURCE || _SVID_SOURCE
+.SH 説明
+これらのルーチンは、ファイルシステムを記述したファイル \fI/etc/fstab\fP と、マウントされているファイルシステムを記述したファイル
+\fI/etc/mtab\fP にアクセスするために用いられる。
+.PP
+The \fBsetmntent\fP() function opens the filesystem description file
+\fIfilename\fP and returns a file pointer which can be used by \fBgetmntent\fP().
+The argument \fItype\fP is the type of access required and can take the same
+values as the \fImode\fP argument of \fBfopen\fP(3). The returned stream should
+be closed using \fBendmntent\fP() rather than \fBfclose\fP(3).
+.PP
+\fBgetmntent\fP() 関数は \fIstream\fP からファイルシステムの記述ファイルの次の行を読み込み、
+読み込んだ行をフィールドに分割した内容を収めた構造体へのポインターを返す。 ポインターはメモリーの静的な領域を指しており、この領域は
+\fBgetmntent\fP() を次に呼び出したときに上書きされてしまう。
+.PP
+\fBaddmntent\fP() 関数は \fImntent\fP 構造体 \fImnt\fP の内容を、オープンされている \fIstream\fP の最後に追加する。
+.PP
+\fBendmntent\fP() 関数はファイルシステムの記述ファイルに関連付けられている \fIstream\fP を閉じる。
+.PP
+\fBhasmntopt\fP() 関数は \fImntent\fP 構造体 \fImnt\fP の \fImnt_opts\fP フィールド (下記 参照) をスキャンし、
+\fIopt\fP に一致する部分文字列があるかを調べる。 有効なマウントオプションについては \fI<mntent.h>\fP と
+\fBmount\fP(8) を参照のこと。
+.PP
+リエントラントな関数 \fBgetmntent_r\fP() は \fBgetmntent\fP() と同じだが、 ユーザーが用意した \fI*mntbuf\fP に
+\fIstruct mount\fP を格納し、その構造体の各エントリーが指し示す文字列を ユーザーが用意した大きさ \fIbuflen\fP の配列 \fIbuf\fP
+に書き込む。
+.PP
+\fImntent\fP 構造体は \fI<mntent.h>\fP で以下のように定義されている。
+.PP
+.in +4n
+.EX
+struct mntent {
+ char *mnt_fsname; /* name of mounted file system */
+ char *mnt_dir; /* file system path prefix */
+ char *mnt_type; /* mount type (see mntent.h) */
+ char *mnt_opts; /* mount options (see mntent.h) */
+ int mnt_freq; /* dump frequency in days */
+ int mnt_passno; /* pass number on parallel fsck */
+};
+.EE
+.in
+.PP
+Since fields in the mtab and fstab files are separated by whitespace, octal
+escapes are used to represent the characters space (\e040), tab (\e011),
+newline (\e012), and backslash (\e\e) in those files when they occur in one
+of the four strings in a \fImntent\fP structure. The routines \fBaddmntent\fP()
+and \fBgetmntent\fP() will convert from string representation to escaped
+representation and back. When converting from escaped representation, the
+sequence \e134 is also converted to a backslash.
+.SH 返り値
+\fBgetmntent\fP() と \fBgetmntent_r\fP() は \fImntent\fP 構造体へのポインターを返す。 失敗した場合は NULL
+を返す。
+.PP
+\fBaddmntent\fP() 関数は成功したら 0 を返し、失敗したら 1 を返す。
+.PP
+\fBendmntent\fP() 関数はつねに 1 を返す。
+.PP
+\fBhasmntopt\fP() 関数は、マッチした場合は部分文字列へのアドレスを返し、 マッチしなければ NULL を返す。
+.SH ファイル
+.TP
+\fI/etc/fstab\fP
+filesystem description file
+.TP
+\fI/etc/mtab\fP
+mounted filesystem description file
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.ad l
+.TS
+allbox;
+lbw13 lb lbw31
+l l l.
+インターフェース 属性 値
+T{
+\fBsetmntent\fP(),
+\fBendmntent\fP(),
+\fBhasmntopt\fP()
+T} Thread safety MT\-Safe
+T{
+\fBgetmntent\fP()
+T} Thread safety MT\-Unsafe race:mntentbuf locale
+T{
+\fBaddmntent\fP()
+T} Thread safety MT\-Safe race:stream locale
+T{
+\fBgetmntent_r\fP()
+T} Thread safety MT\-Safe locale
+.TE
+.ad
+.SH 準拠
+リエントラントでない関数は SunOS 4.1.3 由来のものである。 \fBgetmntent_r\fP() 関数は HPUX 10
+で導入されたが、このバージョンでは \fIint\fP を返す。 上記に示したプロトタイプは glibc 独自のものである。
+.SH 注意
+System V にも \fBgetmntent\fP() 関数はあるが、 呼び出し手順が異なり、返される構造体も異なる。 System V では
+\fI/etc/mnttab\fP が用いられる。 4.4BSD と Digital UNIX には \fBgetmntinfo\fP() があるが、
+システムコール \fBgetfsstat\fP() のラッパー関数である。
+.SH 関連項目
+\fBfopen\fP(3), \fBfstab\fP(5), \fBmount\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+.\" Copyright (C) 2003 Andries Brouwer (aeb@cwi.nl)
+.\"
+.\" %%%LICENSE_START(VERBATIM)
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date. The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein. The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\" The pathconf note is from Walter Harms
+.\" This is not a system call on Linux
+.\"
+.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 2004-2005 Yuichi SATO
+.\" all rights reserved.
+.\" Translated Tue Jun 29 23:36:41 JST 2004
+.\" by Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated & Modified Sun Jan 9 22:50:29 JST 2005 by Yuichi SATO
+.\"
+.TH STATVFS 3 2017\-09\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+statvfs, fstatvfs \- ファイルシステムの統計を取得する
+.SH 書式
+\fB#include <sys/statvfs.h>\fP
+.PP
+\fBint statvfs(const char *\fP\fIpath\fP\fB, struct statvfs *\fP\fIbuf\fP\fB);\fP
+.br
+\fBint fstatvfs(int \fP\fIfd\fP\fB, struct statvfs *\fP\fIbuf\fP\fB);\fP
+.SH 説明
+関数 \fBstatvfs\fP() はマウントされたファイルシステムについての情報を返す。 \fIpath\fP
+はマウントされたファイルシステム中の任意のファイルのパス名である。 \fIbuf\fP は、だいたい以下のように定義されている \fIstatvfs\fP
+構造体へのポインターである:
+.PP
+.in +4n
+.EX
+struct statvfs {
+ unsigned long f_bsize; /* Filesystem block size */
+ unsigned long f_frsize; /* Fragment size */
+ fsblkcnt_t f_blocks; /* Size of fs in f_frsize units */
+ fsblkcnt_t f_bfree; /* Number of free blocks */
+ fsblkcnt_t f_bavail; /* Number of free blocks for
+ unprivileged users */
+ fsfilcnt_t f_files; /* Number of inodes */
+ fsfilcnt_t f_ffree; /* Number of free inodes */
+ fsfilcnt_t f_favail; /* Number of free inodes for
+ unprivileged users */
+ unsigned long f_fsid; /* Filesystem ID */
+ unsigned long f_flag; /* Mount flags */
+ unsigned long f_namemax; /* Maximum filename length */
+};
+.EE
+.in
+.PP
+ここで、型 \fIfsblkcnt_t\fP と \fIfsfilcnt_t\fP は \fI<sys/types.h>\fP で定義されている。
+かつて、これらは共に \fIunsigned long\fP であった。
+.PP
+.\" XXX Keep this list in sync with statfs(2)
+The field \fIf_flag\fP is a bit mask indicating various options that were
+employed when mounting this filesystem. It contains zero or more of the
+following flags:
+.TP
+\fBST_MANDLOCK\fP
+Mandatory locking is permitted on the filesystem (see \fBfcntl\fP(2)).
+.TP
+\fBST_NOATIME\fP
+Do not update access times; see \fBmount\fP(2).
+.TP
+\fBST_NODEV\fP
+Disallow access to device special files on this filesystem.
+.TP
+\fBST_NODIRATIME\fP
+Do not update directory access times; see \fBmount\fP(2).
+.TP
+\fBST_NOEXEC\fP
+Execution of programs is disallowed on this filesystem.
+.TP
+\fBST_NOSUID\fP
+The set\-user\-ID and set\-group\-ID bits are ignored by \fBexec\fP(3) for
+executable files on this filesystem
+.TP
+\fBST_RDONLY\fP
+This filesystem is mounted read\-only.
+.TP
+\fBST_RELATIME\fP
+Update atime relative to mtime/ctime; see \fBmount\fP(2).
+.TP
+\fBST_SYNCHRONOUS\fP
+Writes are synched to the filesystem immediately (see the description of
+\fBO_SYNC\fP in \fBopen\fP(2)).
+.PP
+返された構造体の全てのメンバが全てのファイルシステムで 意味のある値であるか否かは、指定されていない。
+.PP
+\fBfstatvfs\fP() は、ディスクリプター \fIfd\fP で参照されるオープンされたファイルについて、同じ情報を返す。
+.SH 返り値
+成功した場合、0 が返される。 失敗した場合、 \-1 が返され、 \fIerrno\fP に適切な値がセットされる。
+.SH エラー
+.TP
+\fBEACCES\fP
+(\fBstatvfs\fP() の場合) \fIpath\fP のディレクトリ部分に検索許可が与えられていない (\fBpath_resolution\fP(7)
+も参照すること)。
+.TP
+\fBEBADF\fP
+(\fBfstatvfs\fP() の場合) \fIfd\fP が有効なオープンファイルディスクリプターではない。
+.TP
+\fBEFAULT\fP
+\fIbuf\fP または \fIpath\fP が無効なアドレスを指している。
+.TP
+\fBEINTR\fP
+この呼び出しがシグナルで中断された。 \fBsignal\fP(7) 参照。
+.TP
+\fBEIO\fP
+ファイルシステムからの読み込みの間に I/O エラーが発生した。
+.TP
+\fBELOOP\fP
+(\fBstatvfs\fP() の場合) \fIpath\fP にシンボリックリンクが多すぎる。
+.TP
+\fBENAMETOOLONG\fP
+(\fBstatvfs\fP() の場合) \fIpath\fP が長すぎる。
+.TP
+\fBENOENT\fP
+(\fBstatvfs\fP() の場合) \fIpath\fP で参照されるファイルが存在しない。
+.TP
+\fBENOMEM\fP
+十分なカーネルメモリーがない。
+.TP
+\fBENOSYS\fP
+ファイルシステムがこの呼び出しをサポートしていない。
+.TP
+\fBENOTDIR\fP
+(\fBstatvfs\fP() の場合) \fIpath\fP のディレクトリ部分がディレクトリでない。
+.TP
+\fBEOVERFLOW\fP
+いくつかの値が大き過ぎて、返り値の構造体で表現できない。
+.SH 属性
+この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。
+.TS
+allbox;
+lbw21 lb lb
+l l l.
+インターフェース 属性 値
+T{
+\fBstatvfs\fP(),
+\fBfstatvfs\fP()
+T} Thread safety MT\-Safe
+.TE
+.SH 準拠
+POSIX.1\-2001, POSIX.1\-2008.
+.PP
+Only the \fBST_NOSUID\fP and \fBST_RDONLY\fP flags of the \fIf_flag\fP field are
+specified in POSIX.1. To obtain definitions of the remaining flags, one
+must define \fB_GNU_SOURCE\fP.
+.SH 注意
+Linux カーネルには、このライブラリコールをサポートするために、 \fBstatfs\fP(2), \fBfstatfs\fP(2) システムコールがある。
+.PP
+.\" glibc commit 3cdaa6adb113a088fdfb87aa6d7747557eccc58d
+In glibc versions before 2.13, \fBstatvfs\fP() populated the bits of the
+\fIf_flag\fP field by scanning the mount options shown in \fI/proc/mounts\fP.
+However, starting with Linux 2.6.36, the underlying \fBstatfs\fP(2) system
+call provides the necessary information via the \fIf_flags\fP field, and since
+glibc version 2.13, the \fBstatvfs\fP() function will use information from
+that field rather than scanning \fI/proc/mounts\fP.
+.PP
+The glibc implementations of
+.PP
+.in +4n
+.EX
+pathconf(path, _PC_REC_XFER_ALIGN);
+pathconf(path, _PC_ALLOC_SIZE_MIN);
+pathconf(path, _PC_REC_MIN_XFER_SIZE);
+.EE
+.in
+.PP
+respectively use the \fIf_frsize\fP, \fIf_frsize\fP, and \fIf_bsize\fP fields
+returned by a call to \fBstatvfs\fP() with the argument \fIpath\fP.
+.SH 関連項目
+\fBstatfs\fP(2)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
--- /dev/null
+.\" Copyright 1996 Daniel Quinlan (Daniel.Quinlan@linux.org)
+.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
+.\"
+.\" 2007-12-14 mtk Added Reiserfs, XFS, JFS.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
+.\" Japanese Version Copyright (c) 1997 Ueyama Rui
+.\" all rights reserved.
+.\" Translated Tue Aug 19 21:56:35 JST 1997
+.\" by Ueyama Rui <rui@campus.or.jp>
+.\" Modified Wed Oct 10 11:07:33 JST 2001
+.\" by Yuichi SATO <ysato@h4.dion.ne.jp>
+.\" Updated Fri Dec 21 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2012-04-30, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH FILESYSTEMS 5 2020\-12\-21 Linux "Linux Programmer's Manual"
+.nh
+.SH 名前
+filesystems \- Linux のファイルシステム種別: ext, ext2, ext3, ext4, hpfs, iso9660, JFS,
+minix, msdos, ncpfs nfs, ntfs, proc, Reiserfs, smb, sysv, umsdos, vfat, XFS,
+xiafs
+.SH 説明
+.\" commit: 6af9f7bf3c399e0ab1eee048e13572c6d4e15fe9
+When, as is customary, the \fBproc\fP filesystem is mounted on \fI/proc\fP, you
+can find in the file \fI/proc/filesystems\fP which filesystems your kernel
+currently supports; see \fBproc\fP(5) for more details. There is also a
+legacy \fBsysfs\fP(2) system call (whose availability is controlled by the
+\fBCONFIG_SYSFS_SYSCALL\fP kernel build configuration option since Linux 3.15)
+that enables enumeration of the currently available filesystem types
+regardless of \fI/proc\fP availability and/or sanity.
+.PP
+If you need a currently unsupported filesystem, insert the corresponding
+kernel module or recompile the kernel.
+.PP
+ファイルシステムを使うためには、 \fIマウント\fP する必要がある。 \fBmount\fP(2) と \fBmount\fP(8) を参照のこと。
+.PP
+The following list provides a short description of the available or
+historically available filesystems in the Linux kernel. See the kernel
+documentation for a comprehensive description of all options and
+limitations.
+.TP 10
+\fBext\fP
+\fBminix\fP ファイルシステムの手の込んだ拡張である。これは第二拡張ファイルシステム (second extended filesystem :
+\fBext2\fP) に完全にとって代わられ、カーネル 2.1.21 で取り除かれた。
+.TP
+\fBext2\fP
+Linux の高性能なファイルシステムである。これは固定ディスクだけではなく リムーバブルディスクにもよく使われる。 拡張ファイルシステム
+(\fBext\fP) の発展として第二拡張ファイルシステム (\fBext2\fP) が設計された。 \fBext2\fP を参照のこと。
+.TP
+\fBext3\fP
+\fBext2\fP ファイルシステムにジャーナル機能をつけたものである。 \fBext2\fP と \fBext3\fP は簡単に行きつ戻りつできる。
+\fBext3\fP(5) を参照のこと。
+.TP
+\fBext4\fP
+\fBext3\fP の改良版であり、性能と信頼性のかなりの改善と、ボリューム、ファイル、ディレクトリのサイズの上限の大幅な拡張が行われている。
+\fBext4\fP(5) を参照のこと。
+.TP
+\fBhpfs\fP
+は OS/2 で使われる高性能ファイルシステム(High Performance Filesystem)である。
+このファイルシステムはドキュメントが入手できないため、 Linux では読み込み専用 (Read\-only) でしか使用できない。
+.TP
+\fBiso9660\fP
+は ISO 9660 標準に沿った CD\-ROM のファイルシステムである。
+.RS
+.TP
+\fBHigh Sierra\fP
+Linux はハイシェラ (High Sierra) をサポートしている。これは ISO 9660 標準が 決まるより前に使われていた CD\-ROM
+ファイルシステムである。Linux の \fBiso9660\fP ファイルシステムサポートがハイシェラファイルシステムを自動で 認識することができる。
+.TP
+\fBRock Ridge\fP
+Linux はロックリッジ (Rock Ridge) 変換プロトコルで規定された システム使用
+共有プロトコルもサポートしている。これは UNIX ホ ストのファイルを \fBiso9660\fP
+ファイルシステムでより詳しく記述するために使用され、長いファイル名や UID/GID、
+POSIX 形式のパーミッション、デバイスファイル などの情報を提供する。Linux の
+\fBiso9660\fP ファイルシステムサポートがロックリッジファイルシステムを自動で
+認識することができる。
+.RE
+.TP
+\fBJFS\fP
+IBM により開発されたジャーナリングファイルシステムである。
+カーネル 2.4.24 で Linux に統合された。
+.TP
+\fBminix\fP
+Minix オペレーティングシステムのファイルシステム。 Linux で動いた最初のファイルシステムでもある。これには多くの欠点がある。
+パーティションのサイズが最大 64\ MB であること、短いファイル名しか使えない、タイムスタンプが一つだけである、などなど。 フロッピーや RAM
+ディスクに便利なのでまだ残っている。
+.TP
+\fBmsdos\fP
+は DOS や Windows、いくらかの OS/2 コンピュータが使っているファイル システムである。 この \fBmsdos\fP
+ファイルシステムでは「8 文字の名前+ピリオド+3 文字の拡張子」より 長いファイル名はつけることができない。
+.TP
+\fBncpfs\fP
+は NCP プロトコルをサポートしたファイルシステムである。Novell NetWare が 使っている。 バージョン 4.17
+でカーネルから削除された。
+.IP
+\fBncpfs\fP を使うためには
+.UR ftp://ftp.gwdg.de\:/pub\:/linux\:/misc\:/ncpfs
+.UE
+にある特殊なプログラムが必要である。
+.TP
+\fBnfs\fP
+はネットワークファイルシステムである。 離れたコンピュータのディスクを使うことができる。
+.TP
+\fBntfs\fP
+is the filesystem native to Microsoft Windows NT, supporting features like
+ACLs, journaling, encryption, and so on.
+.TP
+\fBproc\fP
+はカーネルデータ構造へのインターフェイスとなる疑似ファイルシステムである。 これは \fI/dev/kmem\fP
+を読んで解釈することの代わりとして使うことができる。 このファイルシステムのファイルはディスクスペースを使用しない。 \fBproc\fP(5)
+を参照のこと。
+.TP
+\fBReiserfs\fP
+Hans Reiser によって設計されたジャーナリングファイルシステムである。
+カーネル 2.4.1 で Linux に統合された。
+.TP
+\fBsmb\fP
+は SMB プロトコルをサポートしたネットワークファイルシステムである。 Windows for Workgroups, Windows NT, Lan
+Manager が使っている。
+.UR https://www.samba.org\:/samba\:/smbfs/
+.UE
+参照。
+.TP
+\fBsysv\fP
+は System V/Coherent ファイルシステムの Linux での実装である。 Xenix, System V/386, Coherent
+各ファイルシステムを使うことができる。
+.TP
+\fBumsdos\fP
+は DOS ファイルシステムを拡張した Linux のファイルシステムである。 これは DOS ファイルシステムのもとで、長いファイル名や
+UID/GID、POSIX 形式の パーミッション、(デバイスファイルや名前付きパイプなどの) 特殊ファイルを 使えるようにしたものである。DOS
+との互換性がある。
+.TP
+\fBtmpfs\fP
+is a filesystem whose contents reside in virtual memory. Since the files on
+such filesystems typically reside in RAM, file access is extremely fast.
+See \fBtmpfs\fP(5).
+.TP
+\fBvfat\fP
+は Microsoft Windows95 と Windows NT が使う FAT ファイルシステムの拡張である。 \fBvfat\fP
+では、長いファイル名が使えるようになっている。
+.TP
+\fBXFS\fP
+SGI により開発されたジャーナリングファイルシステムである。
+カーネル 2.4.20 で Linux に統合された。
+.TP
+\fBxiafs\fP
+は Minix ファイルシステムの拡張で、より安定し安全なファイルシステムとして 設計、実装された。これは、いらない複雑さは避けつつ必要な基本的機能を
+備えている。 \fBxiafs\fP ファイルシステムは、もはや開発もメンテナンスも行われていない。 カーネル 2.1.21 で取り除かれた。
+.SH 関連項目
+\fBfuse\fP(4), \fBbtrfs\fP(5), \fBext2\fP(5), \fBext3\fP(5), \fBext4\fP(5), \fBnfs\fP(5),
+\fBproc\fP(5), \fBsysfs\fP(5), \fBtmpfs\fP(5), \fBxfs\fP(5), \fBfsck\fP(8), \fBmkfs\fP(8),
+\fBmount\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
+\%https://www.kernel.org/doc/man\-pages/ に書かれている。
.PP
パス解決過程では、これらのエントリーが物理的なファイルシステムに 実際に存在するか否かに関わらず、慣習的な意味を持つと仮定する。
.PP
-One cannot walk up past the root: "/.." is the same as "/".
+ルートより上に辿ることはできない: "/.." は "/" と同じである。
.SS マウント位置
"mount dev path" コマンドを実行した後、 パス名 "path" はデバイス "dev" 上のファイルシステム階層の
ルートディレクトリを参照するようになり、以前の位置を参照しない。